Skip to content

Commit bd6d0ef

Browse files
authored
Merge pull request #13 from oslabs-beta/dev
Final version of Reactime 19, merge into master
2 parents 6bf4b71 + 8ce67c5 commit bd6d0ef

File tree

226 files changed

+2767
-18447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+2767
-18447
lines changed

.babelrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"presets": [
3-
"airbnb"
4-
],
2+
"presets": ["airbnb", "@babel/preset-typescript"],
53
"plugins": ["@emotion"]
64
}

.eslintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
"airbnb",
44
"plugin:jest/recommended",
55
"plugin:@typescript-eslint/eslint-recommended",
6-
"plugin:@typescript-eslint/recommended"
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:testing-library/react", // added in for RTL tests
8+
"plugin:jest-dom/recommended" // added in for RTL tests
79
],
810
"root": true,
9-
"plugins": ["jest", "react", "react-hooks", "@typescript-eslint"],
11+
"plugins": ["jest", "react", "react-hooks", "@typescript-eslint", "testing-library", "jest-dom"],
1012
"rules": {
1113
"arrow-parens": [2, "as-needed"],
1214
"import/no-unresolved": "off",

README.md

Lines changed: 103 additions & 175 deletions
Large diffs are not rendered by default.

assets/frontend-diagram.png

12 KB
Loading

assets/v19/Overview.gif

2.45 MB
Loading

assets/v19/history.gif

719 KB
Loading

assets/v19/map.gif

1010 KB
Loading

assets/v19/performance.gif

1.29 MB
Loading

assets/v19/tree-and-diff.gif

830 KB
Loading

demo-app-next/src/components/Board.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from "react";
22
import Row from "./Row";
3-
import { BoardText, BoardContent, Scoreboard, Player } from "../types/types";
3+
import { BoardContent, Scoreboard, Player } from "../types/types";
44

55
type BoardState = {
66
board: BoardContent;
@@ -11,7 +11,7 @@ type BoardState = {
1111
};
1212

1313
class Board extends Component<{}, BoardState> {
14-
constructor(props: any) {
14+
constructor(props: unknown) {
1515
super(props);
1616
this.state = {
1717
board: this.newBoard(),
@@ -25,7 +25,7 @@ class Board extends Component<{}, BoardState> {
2525
this.handleBoxClick = this.handleBoxClick.bind(this);
2626
}
2727

28-
componentDidUpdate() {
28+
componentDidUpdate():void {
2929
this.checkForWinner();
3030
}
3131

@@ -127,7 +127,7 @@ class Board extends Component<{}, BoardState> {
127127
this.setState({ board: boardCopy, currentPlayer: newPlayer });
128128
}
129129

130-
render() {
130+
render(): JSX.Element {
131131
const rows: Array<JSX.Element> = [];
132132
for (let i = 0; i < 3; i++) {
133133
rows.push(
@@ -139,7 +139,7 @@ class Board extends Component<{}, BoardState> {
139139
/>
140140
);
141141
}
142-
const { X, O }: Scoreboard = this.state.scoreboard;
142+
// const { X, O }: Scoreboard = this.state.scoreboard;
143143

144144
return (
145145
<div className="board">

0 commit comments

Comments
 (0)