cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv headernumbered-list123split-screen
CodePen probably won't work great in this browser. We generally only support the major desktop browsers like Chrome, Firefox, Safari, and Edge. Use this one at your own risk! If you're looking to test things, try looking at Pens/Projects in Debug View.
user profile image

This Pen is a fork of Sophie Alpert's Pen Tic Tac Toe.

Comments

  1. hi,

    Wouldn't it make sense if, when traveling back in time, the history gets updated as well ?

    // nothing changes above this
    jumpTo(step) {
        const history = this.state.history.slice(0, step + 1);
        this.setState({
          history: history,
          stepNumber: step,
          xIsNext: step % 2 === 0
        });
      }
    // nothing changes below this
    

    Full example visible here (it's a simple fork):
    https://codepen.io/dgoosens/pen/QarrVJ?editors=0010

    @dgoosens

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.
Loading...
Loading...