React Context API + hook

We created here 2 context – instead of 1

I make a codesendbox for us to see the fix.

https://codesandbox.io/s/focused-night-i95fr

We should create context only one time, to wrap the App component with the provider, and we can use this context like you did wherever we want

And relative to the beginner, it seems from your code that you understand what you are doing

about your comment – attached a pic

enter image description here

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top