Last active
August 15, 2017 13:27
-
-
Save vdsabev/f4ad47d71b0d863e84d4682a02ede3be to your computer and use it in GitHub Desktop.
Exploring Unidirectional Components in Mithril
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 Counter = ({ count, decrement, increment }) => ( | |
<div>...</div> | |
); | |
app({ | |
state: { ... }, | |
actions: { ... }, | |
view: (state, actions) => | |
<Counter | |
count={state.count} | |
decrement={actions.decrement} | |
increment={actions.increment} | |
/> | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment