Skip to content

Conversation

@exiadbq
Copy link
Contributor

@exiadbq exiadbq commented Apr 26, 2017

  • remove function scope that not needed
  • don't have access to code pen though. todo for @gaearon

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. If you've added code that should be tested, add tests!
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes (npm test).
  5. Make sure your code lints (npm run lint).
  6. Format your code with prettier (npm run prettier).
  7. Run the Flow typechecks (npm run flow).
  8. If you added or removed any tests, run ./scripts/fiber/record-tests before submitting the pull request, and commit the resulting changes.
  9. If you haven't already, complete the CLA.

- remove function scope that not needed 
- don't have access to code pen though.
@gaearon
Copy link
Collaborator

gaearon commented Apr 26, 2017

@brigand Can you look at this?

brigand added a commit to brigand/react that referenced this pull request Apr 27, 2017
@brigand
Copy link
Contributor

brigand commented Apr 27, 2017

@exiadbq thanks! I added these changes to the main tutorial PR.

I'm not sure how to give you credit for the commit.

@exiadbq
Copy link
Contributor Author

exiadbq commented Apr 27, 2017

@brigand nps, didn't know there was PR for that, otherwise I can commit there.

Closing this one for now.

@exiadbq exiadbq closed this Apr 27, 2017
gaearon pushed a commit that referenced this pull request May 1, 2017
* tutorial: adds note about onClick

* tutorial: show full square component

* merge

* fixes line number

* tutorial: misc changes

* fixes Board render initial code sample

* [tutorial] adds codepen links and misc small fixes

* removes useless arrow functions, #9531

* {this.renderSquare} new lines

* be more explicit about history state

* fixes highlight

* following along locally

* changes todo to this.props.value

* removes calculateWinner from initial codepens and includes it in tutorial

* removes note about calculateWinner at end of file

* adds debug-view and debug-view-final

* removes debug view, updates codepen instructions

* adds another codepen

* tutorial.md

* tutorial.md

* tutorial.md

* tutorial.md

* Put . into links for consistency with docs

* Make the very first change easier to follow

* A few more changes
gaearon pushed a commit that referenced this pull request May 1, 2017
* tutorial: adds note about onClick

* tutorial: show full square component

* merge

* fixes line number

* tutorial: misc changes

* fixes Board render initial code sample

* [tutorial] adds codepen links and misc small fixes

* removes useless arrow functions, #9531

* {this.renderSquare} new lines

* be more explicit about history state

* fixes highlight

* following along locally

* changes todo to this.props.value

* removes calculateWinner from initial codepens and includes it in tutorial

* removes note about calculateWinner at end of file

* adds debug-view and debug-view-final

* removes debug view, updates codepen instructions

* adds another codepen

* tutorial.md

* tutorial.md

* tutorial.md

* tutorial.md

* Put . into links for consistency with docs

* Make the very first change easier to follow

* A few more changes

(cherry picked from commit e9d6f3f)
@gaearon
Copy link
Collaborator

gaearon commented May 1, 2017

@brigand and I rewrote some parts of the tutorial in #9454, and following along should be easier now. Let us know if you're still struggling! We’re happy to look at remaining issues in case we missed anything.

https://facebook.github.io/react/tutorial/tutorial.html

@exiadbq
Copy link
Contributor Author

exiadbq commented May 2, 2017

Hi @gaearon what was your consideration not including this change?

This event handler calls `this.props.onClick()`.
Technically, the event handler calls onClick rather than the result of onClick(). And i is a fixed value from the scope of onClick={() => this.handleClick(i)}

@gaearon
Copy link
Collaborator

gaearon commented May 2, 2017

Can you send another PR on top of the current changes, and I’ll take a look? Thanks!

flarnie pushed a commit that referenced this pull request Jun 12, 2017
* tutorial: adds note about onClick

* tutorial: show full square component

* merge

* fixes line number

* tutorial: misc changes

* fixes Board render initial code sample

* [tutorial] adds codepen links and misc small fixes

* removes useless arrow functions, #9531

* {this.renderSquare} new lines

* be more explicit about history state

* fixes highlight

* following along locally

* changes todo to this.props.value

* removes calculateWinner from initial codepens and includes it in tutorial

* removes note about calculateWinner at end of file

* adds debug-view and debug-view-final

* removes debug view, updates codepen instructions

* adds another codepen

* tutorial.md

* tutorial.md

* tutorial.md

* tutorial.md

* Put . into links for consistency with docs

* Make the very first change easier to follow

* A few more changes

(cherry picked from commit e9d6f3f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants