Skip to content

Commit bff9652

Browse files
authored
Merge pull request #73 from EAlexRojas/react_17
Adding support for React 17
2 parents 3b0661e + 83a4b73 commit bff9652

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

samples/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ test everything. They are not meant to be "good practises".
77

88
# make sure tea-cup is compiled
99
cd react-tea-cup
10-
npm install
11-
npm run compile
10+
yarn install
11+
cd core
12+
yarn run compile
13+
cd ../tea-cup
14+
yarn run compile
1215

13-
# build and run the samples
14-
cd samples
15-
npm install
16-
npm start
16+
# run the samples
17+
# With React 16 (default)
18+
cd ../samples
19+
yarn start
20+
21+
# With React 17
22+
cd ../samples
23+
yarn upgrade react@^17.0.1 react-dom@^17.0.1 @types/react@^17.0.1 @types/react-dom@^17.0.1
24+
yarn start
1725

1826
The samples app is made with `create-react-app`. See the scripts in `package.json`.

samples/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ function viewHome(dispatch: Dispatcher<Msg>) {
415415
</a>
416416
.
417417
</p>
418+
<pre>React version: {React.version}</pre>
418419
</div>
419420
);
420421
}

tea-cup/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
},
2222
"dependencies": {},
2323
"peerDependencies": {
24-
"react": "^16.7.0",
24+
"react": "^16.7.0 || ^17.0.1",
2525
"tea-cup-core": "^2.1.0"
2626
},
2727
"devDependencies": {
2828
"@types/jsdom": "^16.2.5",
2929
"@types/react": "^16.7.22",
3030
"jsdom": "^16.4.0"
3131
}
32-
}
32+
}

0 commit comments

Comments
 (0)