Last active
August 15, 2017 13:27
-
-
Save vdsabev/3ffd2601e2e89851405728d494e18f0c 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 = ({ attrs: { count = 0 } }) => { | |
const decrement = () => count--; | |
const increment = () => count++; | |
return { | |
view: () => <div>...</div> | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment