Create Global State object using Context API that fulfils the following:
When create a user you have store the the user id on Global State
When we are playing the game we need to store the next question object on Global State
When we create a game or join a game we need to store the game_instance id on Global State
Create Global State object using Context API that fulfils the following:
When create a user you have store the the user id on Global State When we are playing the game we need to store the next question object on Global State When we create a game or join a game we need to store the game_instance id on Global State
You should write this on index.js
Check this article for inspiration https://medium.com/@samuelresua/global-state-with-react-context-cfa99946900d