This problem comes from LeetCode: https://leetcode.com/problems/reshape-the-matrix, “Reshape the Matrix”. You are given an m x n matrix mat and two integers r and c representing the number of rows and the number of columns of the wanted reshaped matrix. The reshaped matrix should be filled with all the elements of the original matrix in the same row-traversing order as they were. If the reshape operation …

# Author Archives: Moses Johansson

## Get value from child component to parent component

To get the value from a child component into the parent component in React is not that complicated but it is quite easy to forget, at least I did, so let’s go through the steps! This is React so there are a few options, for one, create an hook which is shared by both components, …

Continue reading “Get value from child component to parent component”