2 Matching Annotations
- Nov 2019
-
www.robinwieruch.de www.robinwieruch.de
-
However, again you would have to lift state up to the App component in order to pass the amount to the currency components. As you can see, the component composition on its own doesn't help us to solve the problem. That's the point where React's render props pattern comes into play which enhances React's component composition with an important ingredient: a render function.
-
But it's not that simple, because the currency components don't know about the amount now. You would have to lift the state from the Amount component to the App component.
-