Skip to content

Create a simple application to test the hooks' concept of react

Notifications You must be signed in to change notification settings

slim-hmidi/react-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-hooks

Create a simple application to test the hooks' concept of react.

In order to try the new concept of hooks, I tried to create a simple application which give a random addition operation then a user enter a result, if it's correct a modal with success message will be displayed. Unless a wrong message will be shown.

To realize this app, I used also math-js, it's a math library for javascript and nodejs. It contains a lot of functions which you to combine mathematical operations to your code.

For more information about this package, just click on this link:

http://mathjs.org

To run the example, you have to run:

npm install

Then:

npm run start:dev

At the time of writing this app, react hooks are not officially implemented in the stable version of react, So I used an alphaversion.

References:

https://reactjs.org/docs/hooks-intro.html

https://reactjs.org/blog/2019/02/06/react-v16.8.0.html

https://www.youtube.com/watch?v=dpw9EHDh2bM