Nguyễn Quyết
Jul 21 · 1 min read

Thanks for reading my post. We all know that all consumers will re-render when provider change value, but if we use component state of which one who provide the value as context value, it will solve the problem for us by default.

You can read more here (https://medium.com/@ryanflorence/react-context-and-re-renders-react-take-the-wheel-cd1d20663647)

Or you can cd to folder class2 and run npm start to check it yourself (https://github.com/chiquyet199/react-class)

    Nguyễn Quyết

    Written by

    javascrip lover