Three common mistakes when you are working with react context API

aman2221

Aman Singh

Posted on April 22, 2021

Three common mistakes when you are working with react context API

These are the common reasons why react context API does not work properly :

  1. The best common and simplest reason is spelling mistakes. use this awesome VS Code extension: Code Spell Checker
  2. The wrong positioning of the parameter or arguments.

  3. 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 { }.
    code
    This is my first post on the dev community.
    if there are any mistakes please let me know.

Thanks.

💖 💪 🙅 🚩
aman2221
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