Project created to practice the concepts of react hooks at all stages and in detail.
I left the steps commented out so the app doesn't break.
With each new commit, I will test a different concept.
Its simplier examples.
If you are looking for more didactic usage examples (this repository is for personal study only,I will not provide clear explanations)
I suggest studying through this site, which has very complete examples to study hooks:
This website provides easy to understand code examples to help you learn how hooks work and inspire you to take advantage of them in your next project.
Try testing these examples in the code sandbox as the project is small and the examples are short.
npm start
- array and object destructuring
- open/close door with useState
- a simple checkbox using useState and onChange
- star rating with useState and component trees
- change document title with a simple useEffect
- apply better side effects with dependency array in useEffect
- fetch data with useEffect
- increment a number using useReducer
- refactoring useState to UseReducer
- useReducer to dispatch actions
- simple form with useRef
- a controlled component with useState
- create a custom hook reuse form logic
- useContext to placing data in context
- useContext to access data from any child components
- transform a useContext in custom hook
- custom hook to fetch data