Sitemap
1 min readApr 23, 2020

When using React Context API you should be aware that each time the value of the context changes, all the children of the Provider will re-render.

This is a big performance issue when your app gets big. To avoid this, you should use some mechanism to stop the re-rendering of all the components, like the “subscription model” that “react-redux” or other libraries use.

I personally tested this behaviour on my projects, before writing a good library to manage state with hooks.

Lorenzo Spyna
Lorenzo Spyna

Written by Lorenzo Spyna

💻Writes web2 and web3 code | 🚀 firenze.dev co-founder | 🥑 0xpolygon Advocate — https://spyna.it

No responses yet