Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Store(props: any) {
- const { messages, send, user, ctx } = this;
- return (
- <ctx.Provider value={{ messages, send, user }}>
- {props.children}
- </ctx.Provider>
- )
- }
- const App: React.FC = () => {
- const store = new Store();
- return (
- <div className="App">
- <store.Store />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement