use-context-selector
use-context-selector copied to clipboard
Suggestion to use `react18-use`
Quite a few people reached out to this library for render optimization and performance. Unfortunately, the goal of this library is slightly different from the "performance" people look for.
For such cases, probably Zustand works better.
If you need useContextSelector, a simpler implementation might work too.
But, I would like to suggest another option.
react18-use is a new library of mine. It provides a solution with useMemo + use(Context) style.
It's still experimental, but I would like to get feedback. It should work both in React 18 and React 19.