dai-shi / use-context-selector

React useContextSelector hook in userland
https://www.npmjs.com/package/use-context-selector
MIT License
2.68k stars 61 forks source link

Can React.use & React.useMemo replace this hook in react19? #141

Open gland2015 opened 2 weeks ago

gland2015 commented 2 weeks ago

Can React.use & React.useMemo replace this hook in react19? From this article https://interbolt.org/blog/react-use-selector-optimization/

dai-shi commented 2 weeks ago

Yeah, technically. It may not be in React 19 though.

See also: https://x.com/dai_shi/status/1825484689030955094

gland2015 commented 2 weeks ago

ok😢

gland2015 commented 2 weeks ago

Hope React can accelerate the implementation of this feature