© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Jb Rocher
Lead Software Engineer in an Eco-Friendly Start Up
Nice one ! Something I like to do when creating these kind of providers is to export a custom hook wrapping the call to useContext.
useContext
For example : const useTheme = () => useContext(ThemeContext);
const useTheme = () => useContext(ThemeContext);
Chris Bongers
Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊
Very good point, I use this approach most of the time as well. Was just a bit clearer to explain without introducing custom hooks yet.
But super valid point!