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 { createContext } from 'react' | |
const NombreContext =createContext() | |
const NombreProvider = ({children}) => { | |
//definir state, effects y funciones propias | |
return ( | |
<NombreContext.Provider |
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 |