I\'m sending values of numbers from Numbers component to Main component. Everything is working fine until I set that value in my Main component to that component\'s state.<
The setState method is asynchronous, so the new state is not there yet on console.log call. You can pass a callback as a second parameter to setState and call console.log there. In this case the value will be correct.