You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, it seems like step two could also add the onShow as a prop. It still wouldn't work, but it would flow into step three of passing the props down from the parent. Do you want to submit a PR that adds an onShow prop and passes an empty function from the parent?
Summary
When explaining state lifting up, there's a small error in the example function for the second step : Pass hardcoded data from the common parent:
The onClick calls setIsActive, but since there's no state declared, it should be removed.
Page
https://react.dev/learn/sharing-state-between-components
Details
No response
The text was updated successfully, but these errors were encountered: