react-future
react-future copied to clipboard
Attempt to improve "Returning state" section
What about if we can get rid of this
:
render(state = { count: 0 }, props = {}) {
return (
<div>
<span>Clicked {state.count} times!</span>
<a href="javascript:void(0)"
onClick={() => render({ count: state.count + 1, }, props)}>
Click to increment!
</a>
</div>
);
}