Initial commit for react-tic-tac-toe sample#86
Initial commit for react-tic-tac-toe sample#86liminzhu wants to merge 4 commits intomicrosoft:masterfrom
Conversation
react-tic-tac-toe/dist/bundle.js
Outdated
| @@ -0,0 +1,341 @@ | |||
| /******/ (function(modules) { // webpackBootstrap | |||
There was a problem hiding this comment.
Can you remove the bundle?
| } | ||
|
|
||
| // make a move | ||
| private move(pos: number, val: CellValue, callback?: () => void): void { |
There was a problem hiding this comment.
You only call this with a callback at one place, so just pass this.aiMove wrapped in an arrow function.
|
Hey @liminzhu, looks like we're almost there. The sample should not include its dependencies though. That means no |
|
Thanks for helping the review @DanielRosenwasser! Is there a risk of breaking if the |
|
@liminzhu nope because so long as you've locked onto the dependencies in your |
|
@DanielRosenwasser Oh my bad I didn't realize that! Deleted the |
| this.handleGameStateChange(this.state.gameState); | ||
| } | ||
| if (callback) { | ||
| callback.call(this); |
There was a problem hiding this comment.
Sorry, what I meant by my previous comment is that you don't need to bind this to the callback anyhow, so we should get rid of that.
There was a problem hiding this comment.
You can also restore the old aiMove method if you feel it's appropriate.
A typescript-react-webpack sample built following the react-webpack guidelines from typescript handbook.