Browse Source

[beta] Tic-tac-toe tutorial rewrite (#5352)

* Copy over tutorial from old website

Fixed up MDX syntax (self-closing `<br>` and `<img>`, and one `style`
attribute)

* wip

* more wip

* Move tutorial to be consistent with new beta docs structure

* remove HTML comments causing Vercel rendering issues

* Fixed all fixme's, minor clarity improvments, updated code links to codesandbox

* first half of tutorial re-write draft

* Finish tutorial rewrite draft

* Fix some formatting issues

* Migrate tutorial back to JavaScript to fix Sandpack errors

* Fix minor mistakes, formatting, code bugs, clean up images

* Fix empty board image size

* Fix image size and code highlighting issues

* Incorporate feedback from Dan and Sean

* edits (wip)

* edit

* edits

* Update beta/src/content/learn/tutorial-tic-tac-toe.md

Co-authored-by: Strek <ssharishkumar@gmail.com>

* tweak

Co-authored-by: Sophie Alpert <git@sophiebits.com>
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: Strek <ssharishkumar@gmail.com>
main
Matt Carroll 2 years ago
committed by GitHub
parent
commit
81b5f81f29
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      beta/public/images/tutorial/board-filled-with-ones.png
  2. BIN
      beta/public/images/tutorial/board-filled-with-value.png
  3. BIN
      beta/public/images/tutorial/codesandbox-devtools.png
  4. BIN
      beta/public/images/tutorial/devtools-select.gif
  5. BIN
      beta/public/images/tutorial/devtools.png
  6. BIN
      beta/public/images/tutorial/empty-board.png
  7. BIN
      beta/public/images/tutorial/nine-x-filled-squares.png
  8. BIN
      beta/public/images/tutorial/number-filled-board.png
  9. BIN
      beta/public/images/tutorial/o-replaces-x.gif
  10. BIN
      beta/public/images/tutorial/react-starter-code-codesandbox.png
  11. BIN
      beta/public/images/tutorial/tictac-adding-x-s.gif
  12. BIN
      beta/public/images/tutorial/tictac-empty.png
  13. BIN
      beta/public/images/tutorial/tictac-numbers.png
  14. BIN
      beta/public/images/tutorial/two-x-filled-squares.png
  15. BIN
      beta/public/images/tutorial/x-filled-square.png
  16. 2
      beta/src/content/learn/index.md
  17. 2918
      beta/src/content/learn/tutorial-tic-tac-toe.md
  18. 22
      beta/src/sidebarLearn.json

BIN
beta/public/images/tutorial/board-filled-with-ones.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
beta/public/images/tutorial/board-filled-with-value.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
beta/public/images/tutorial/codesandbox-devtools.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
beta/public/images/tutorial/devtools-select.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

BIN
beta/public/images/tutorial/devtools.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

BIN
beta/public/images/tutorial/empty-board.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
beta/public/images/tutorial/nine-x-filled-squares.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
beta/public/images/tutorial/number-filled-board.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
beta/public/images/tutorial/o-replaces-x.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
beta/public/images/tutorial/react-starter-code-codesandbox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

BIN
beta/public/images/tutorial/tictac-adding-x-s.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

BIN
beta/public/images/tutorial/tictac-empty.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
beta/public/images/tutorial/tictac-numbers.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
beta/public/images/tutorial/two-x-filled-squares.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
beta/public/images/tutorial/x-filled-square.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

2
beta/src/content/learn/index.md

@ -536,4 +536,4 @@ button {
By now, you know the basics of how to write React code!
Head to [Thinking in React](/learn/thinking-in-react) to see how it feels to build a UI with React in practice.
Check out the [Tutorial](/learn/tutorial-tic-tac-toe) to put them into practice and build your first mini-app with React.

2918
beta/src/content/learn/tutorial-tic-tac-toe.md

File diff suppressed because it is too large

22
beta/src/sidebarLearn.json

@ -32,10 +32,16 @@
{
"title": "Quick Start",
"path": "/learn",
"routes": [{
"title": "Thinking in React",
"path": "/learn/thinking-in-react"
}]
"routes": [
{
"title": "Tutorial: Tic-Tac-Toe",
"path": "/learn/tutorial-tic-tac-toe"
},
{
"title": "Thinking in React",
"path": "/learn/thinking-in-react"
}
]
},
{
"title": "Describing the UI",
@ -114,9 +120,7 @@
{
"title": "Managing State",
"path": "/learn/managing-state",
"tags": [
"intermediate"
],
"tags": ["intermediate"],
"routes": [
{
"title": "Reacting to Input with State",
@ -151,9 +155,7 @@
{
"title": "Escape Hatches",
"path": "/learn/escape-hatches",
"tags": [
"advanced"
],
"tags": ["advanced"],
"routes": [
{
"title": "Referencing Values with Refs",

Loading…
Cancel
Save