Skip to content

Commit

Permalink
js/react-flipper-example Switch to React 18.2.0 & bump deps (#4901)
Browse files Browse the repository at this point in the history
Summary:
This diff refactors `js/react-flipper-example` to React & ReactDOM `18.2.0` and bumps all deps to the `latest`.
- Also, specifies the `js-flipper` dep version as `*` which is taken care of by the `relative-deps` script.
- Deletes `logo.svg` from `src/`

### Scope: `js/react-flipper-example`

## Changelog

[General][Changed] - [Refactor] `js/react-flipper-example` Switch to React `18.2.0` & bump deps.

Pull Request resolved: #4901

Test Plan: - Should pass `js-flipper / build-react-example (pull_request)` workflow.

Reviewed By: antonk52

Differential Revision: D47868448

Pulled By: passy

fbshipit-source-id: edc67ebe3f205d32ec6198b7130ded287997fe50
  • Loading branch information
Pranav-yadav authored and facebook-github-bot committed Jul 31, 2023
1 parent 143fe0e commit cb4352a
Show file tree
Hide file tree
Showing 7 changed files with 475 additions and 146 deletions.
26 changes: 13 additions & 13 deletions js/react-flipper-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.26",
"@types/react": "^17.0.42",
"@types/react-dom": "^17.0.14",
"js-flipper": "^0.140.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"typescript": "^4.6.2",
"web-vitals": "^2.1.4"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",

This comment has been minimized.

Copy link
@Alirezabigdli
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.2",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"js-flipper": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"typescript": "^5.1.6",
"web-vitals": "^3.3.2"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion js/react-flipper-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>React Flipper WebSocket Example</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
4 changes: 2 additions & 2 deletions js/react-flipper-example/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "Flipper Tic-Tac-Toe",
"name": "React Flipper WebSocket Example",
"icons": [
{
"src": "favicon.ico",
Expand Down
10 changes: 5 additions & 5 deletions js/react-flipper-example/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
*/

import React from 'react';
import ReactDOM from 'react-dom';

import {createRoot} from 'react-dom/client';
import App from './App';

ReactDOM.render(
const root = createRoot(document.getElementById('root') as HTMLElement);

root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root'),
</React.StrictMode>
);
1 change: 0 additions & 1 deletion js/react-flipper-example/src/logo.svg

This file was deleted.

12 changes: 3 additions & 9 deletions js/react-flipper-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"target": "ES6",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
Expand All @@ -20,7 +16,5 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
"include": ["src"]
}
Loading

0 comments on commit cb4352a

Please sign in to comment.