DEV Community

Discussion on: Context in React

Collapse
 
sahilkoun profile image
Sahil

I am Sorry, I should have mentioned about the things me might store in Context (like which changes not on regular basis) and the things we might not.

Collapse
 
peerreynders profile image
peerreynders • Edited

No need to apologize — for the most part the official docs are silent on the matter and I only became aware of it through Mark Erikson's Why React Context is Not a "State Management" Tool.

Phrased differently: Context is a place for "first introductions" between components and cross-component state (management) but not for "regular meetings" between them.

In my opinion the countless "don't need Redux, just use Context" statements communicate a misunderstanding of what context actually is.

There are "lighter" (cross-component) state management solutions like unistore, valtio, zustand and jotai.