react-future icon indicating copy to clipboard operation
react-future copied to clipboard

Attempt to improve "Returning state" section

Open Kureev opened this issue 9 years ago • 12 comments

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>
  );
}

Kureev avatar Jun 15 '15 09:06 Kureev