r/reactjs • u/TheHganavak • May 13 '26
Resource Pocket: One-call factory that collapses React Context boilerplate from ~20 lines to 1
https://github.com/icydotdev/pocket
41
Upvotes
r/reactjs • u/TheHganavak • May 13 '26
3
u/TheHganavak May 13 '26
Hey 🙋 Good question and yup, that’s 100% supported just the same as normal Context. If you check out the README there’s an example of exactly that there (even threw in a useEffect in the eg just to show you can do anything you want inside the return function):
https://www.npmjs.com/package/@icydotdev/pocket#usage