HackYourFuture-CPH / fp-class12

Treasure Hunt Game for children
MIT License
5 stars 3 forks source link

Set up Global State using Context API #180

Open dpfernandes opened 4 years ago

dpfernandes commented 4 years ago

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

zkwsk commented 4 years ago

Also make sure to check the official React guide to Context.

https://reactjs.org/docs/context.html