These are the common reasons why react context API does not work properly :
- The best common and simplest reason is spelling mistakes. use this awesome VS Code extension: Code Spell Checker
The wrong positioning of the parameter or arguments.
While defining StateProvider function when you are using fat arrow function( () => () ) use parenthesis. because most of the time when we define a function we use Curly brackets { }.
This is my first post on the dev community.
if there are any mistakes please let me know.
Thanks.
Top comments (0)