An open API service indexing awesome lists of open source software.

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

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