Based off of how I typically use React Context, this specific example from my React Weather App.
Any comments, suggestions, or constructive criticism, let me know: [email protected]
This is a cheatsheet for using React's Context API for client side state management, useful for smaller scale applications as an alternative to Redux or similar state management libraries. The directory structure would typically be:
yourApp/client/src/utils/context/{context files or sub-directories here}
.- If you want to use multiple contexts, create a sub-directory for each context and actions/reducer/state files for each context.