Store a Token Globally with React Context for Easier Use Anywhere in a Next.js App

Share this video with your friends

Send Tweet

Storing token in the state is not the best idea, so you will migrate from storing the token in local state to a global state. For that you will use React context. With React Context, your token can be easily access from anywhere in the app. You will need that for API calls to Symbl.ai later on.