Last active
November 15, 2018 11:24
-
-
Save zapkub/5ce3d892f7284b4aa79a5f7ede5e1f06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const TodoStoreContext = React.createContext(); | |
const TodoStoreProvider = ({ children }) => { | |
const store = { | |
todos: [ | |
{ | |
title: "Touch myself." | |
}, | |
{ | |
title: "Sleep peacefully" | |
} | |
] | |
}; | |
return ( | |
<TodoStoreContext.Provider value={store}> | |
{children} | |
</TodoStoreContext.Provider> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment