Handle global state in a Gatsby app without using Redux

Last week I post a blog about fetch data from the database/API with useEffect and useContext. That is going to enable the component to fetch some data every time it is rendered. But what about those global states that would be shared by different components scattered all over the application?

What I usually do in a React app