https://github.com/mainick/react-hook-usecontext
Esempio con l'hook React useContext
https://github.com/mainick/react-hook-usecontext
react react-hook usecontext-hook
Last synced: about 2 months ago
JSON representation
Esempio con l'hook React useContext
- Host: GitHub
- URL: https://github.com/mainick/react-hook-usecontext
- Owner: mainick
- Created: 2020-11-25T09:50:01.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-26T16:36:54.000Z (over 5 years ago)
- Last Synced: 2025-07-11T14:40:57.554Z (11 months ago)
- Topics: react, react-hook, usecontext-hook
- Language: JavaScript
- Homepage:
- Size: 210 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Esempio React Hook useContext
L'**hook useContext**, invece del componente Consumer, rende **il codice più leggibile
e non introduce un componente artificiale nel mezzo**,
usa semplicemente l'*oggetto Context* per recuperare il valore più recente da esso.
Come esercizio, utilizziamo sempre l'app delle cose da fare *todos*, integrando l'hook useContext.
https://codesandbox.io/s/react-hook-usecontext-fc031