Three common mistakes when you are working with react context API
Aman Singh
Posted on April 22, 2021
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.
💖 💪 🙅 🚩
Aman Singh
Posted on April 22, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
undefined Exploring the React component lifecycle: A guide to understanding the different phases.
November 29, 2024