Basic Mathematics Game build with React Hooks & Context API - Math Game (using hooks) demo
math_sprint_demo.mov
I learned different react hooks eg: useState()
, useEffect()
, useReducer()
etc.
and build this project to implement those concepts & develop something practical.
- utilized Context API & created custom hooks.
- Custom Provider
GameProvider
which holds global state of the application. - Custom utility hooks eg:
useScore()
: to get score stored insideGameProvider
valueuseGameDispatch()
: to get access ofdispatch
method provided byuseReducer()
hook- some utility action methods to start, end, reset game (
startGame()
,endGame()
,saveBestScore()
etc)
- Custom Provider
- I also implemented
CSS Grid
andflexbox
concepts that I recently learned from different sources.