Created
March 13, 2022 13:35
-
-
Save pablorn91/264889d96fe52e6521fa759b52d7a7e7 to your computer and use it in GitHub Desktop.
Crear un Hook personalizado para facilitar uso de Context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useContext } from "react"; | |
import NombreContext from "../context/NombreProvider"; | |
const useNombre = () => { | |
return useContext(NombreContext) | |
} | |
export default useNombre |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment