React Context

Veröffentlicht am: 13. April 2020

Lesedauer: 1 Min.

Kategorien:

createContext useContext

export const ExampleContext = React.createContext()
<ExampleContext value{'some string value'}>
  {children}
</ExampleContext>

const example = React.useContext(ExampleContext)

Articles in related Categories