This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { argv } from 'yargs' | |
Object.entries(argv).forEach(([key, value]) => { global[key] = value }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
It may be wise to include this at the bottom of your body so that | |
it overrides css which comes before it in the document. | |
*/ | |
@media (prefers-reduced-motion) { | |
* { | |
animation: none !important; | |
transition: none !important; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
const TicTacToe = () => { | |
const [board, setBoard] = useState(Array(9).fill(null)); | |
const [isPlayerXNext, setIsPlayerXNext] = useState(true); | |
const [winner, setWinner] = useState(null); | |
const calculateWinner = (squares) => { | |
const lines = [ | |
[0, 1, 2], |