https://github.com/sheraff/react-context-select
https://github.com/sheraff/react-context-select
performance react-context react-hooks rendering selector
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sheraff/react-context-select
- Owner: Sheraff
- Created: 2022-06-18T10:18:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-19T19:18:47.000Z (almost 4 years ago)
- Last Synced: 2025-01-26T19:51:54.030Z (over 1 year ago)
- Topics: performance, react-context, react-hooks, rendering, selector
- Language: JavaScript
- Homepage: https://sheraff.github.io/react-context-select/
- Size: 504 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A react `createContext` that allows for selectors in `useContext`. Components only re-render if the result of the selector function changes. Use `` without any of the drawbacks.
```js
const prop = useContext(Context, ({ obj }) => obj.prop)
```