code: function(card) {
      return (
        <div>
          <p>
            <button onClick={() => card.setState({ n: 0 })}>
              ZERO
            </button>
            <button onClick={() => card.setState(s => ({ n: s.n + 1 }))}>
              INC
            </button>
            <button onClick={() => card.setState(s => ({ n: s.n - 1 }))}>
              DEC
            </button>
          </p>
          <p>
            The current value of <kbd>n</kbd> is <kbd>{card.state.n}</kbd>
          </p>
        </div>
      );
    }
docs: func-state