Skip to content

Instantly share code, notes, and snippets.

@01Clarian
Created December 10, 2019 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 01Clarian/4874b7dea9806539d9564a2e709539f5 to your computer and use it in GitHub Desktop.
Save 01Clarian/4874b7dea9806539d9564a2e709539f5 to your computer and use it in GitHub Desktop.
Products Provider Test demonstration
import React,{createContext, useState} from 'react'
export const ProductsContext = createContext({
test: ''
})
const ProductsProvider = ({children}) => {
const [test] = useState('the products provider has been successfully connected :)')
return (
<ProductsContext.Provider value={{test}}>
{children}
</ProductsContext.Provider>
)
}
export default ProductsProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment