passing data from child to parent component via callback function
but somehow it\'s not working.
what am I doing wrong here?
passing data from child to parent component - re
You can create a method in parent that accepts some data and then sets the received data as parent state.
Then pass this method to child as props. Now let the method accept child state as input and then let the method set the received child state as parent state.