Created
October 27, 2017 19:39
-
-
Save melikhov-dev/12f095f598c509861da40bb6461075da 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
connect({ | |
items: state`items`, | |
itemAdded: signal`itemAdded` | |
}, | |
function Items ({items, itemAdded}) { | |
return ( | |
<div> | |
<ul> | |
{items.map((item) => <li>{item}</li>)} | |
</ul> | |
<button onClick={() => itemAdded({item: 'foo'})}> | |
Add foo | |
</button> | |
</div> | |
) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment