Contexts should be in their own files and grouped together in a contexts folder. Contexts should only export two things, a hook to consume the context and a higher-order component to provide the context.
📰 Article: https://www.bayanbennett.com/posts/3-...
🗃️ Repository: https://github.com/BayanBennett/refer...
🌐 Site: https://reference.bayanbennett.com/
CHAPTERS #
0:00 Intro
0:34 Folder structure
1:08 Creating the context
1:56 Custom hook
2:09 Custom HOC
3:11 Usage example
4:20 TypeScript Typing
5:06 Summary
---
#ReactJS #TypeScript #JavaScript