---
title: "Comment by Jb Rocher on \"React basics: explaining the useContext hook\" | Hashnode"
description: "Nice one ! Something I like to do when creating these kind of providers is to export a custom hook wrapping the call to useContext . For example : const useThem"
url: "https://hashnode.com/posts/react-basics-explaining-the-usecontext-hook/616bbc0cb636526db5f48ad1/comment/616bde95441bd36daa95658f"
---

[Discussion](https://hashnode.com/posts/react-basics-explaining-the-usecontext-hook/616bbc0cb636526db5f48ad1)

Comment [React basics: explaining the useContext hook](https://hashnode.com/posts/react-basics-explaining-the-usecontext-hook/616bbc0cb636526db5f48ad1)

[Jb Rocher](https://hashnode.com/@jibrocher)

[Oct 17, 2021](https://hashnode.com/posts/react-basics-explaining-the-usecontext-hook/616bbc0cb636526db5f48ad1/comment/616bde95441bd36daa95658f)

Nice one ! Something I like to do when creating these kind of providers is to export a custom hook wrapping the call to `useContext`.

For example : `const useTheme = () => useContext(ThemeContext);`

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Oct 17, 2021](https://hashnode.com/posts/react-basics-explaining-the-usecontext-hook/616bbc0cb636526db5f48ad1/comment/616bde95441bd36daa95658f#reply-616c2c3e7c361e5132822b9f)

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!
