Created
March 7, 2021 15:09
-
-
Save intojs/e3c982fe91e2b548a809ef8b2e021afe to your computer and use it in GitHub Desktop.
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
const MVCComponent = () => { | |
const [model, dispatch] = useReducer(reducer, initialModel); | |
const handleEvent = () => { | |
dispatch(action); | |
}; | |
return <View model={model} handleEvent={handleEvent} />; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment