-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from reduxjs/feature/react-18-updates
- Loading branch information
Showing
9 changed files
with
19,555 additions
and
39,515 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
{ | ||
"package": { | ||
"dependencies": { | ||
"@reduxjs/toolkit": "^1.5.1", | ||
"@testing-library/react": "^9.3.2", | ||
"@testing-library/jest-dom": "^4.2.4", | ||
"@testing-library/user-event": "^7.1.2", | ||
"@types/node": "^12.0.0", | ||
"@types/react": "^16.9.0", | ||
"@types/react-dom": "^16.9.0", | ||
"@types/react-redux": "^7.1.7", | ||
"@types/jest": "^24.0.0", | ||
"react-redux": "^7.2.0", | ||
"typescript": "~4.1.5" | ||
"@reduxjs/toolkit": "^1.8.1", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^13.0.1", | ||
"@testing-library/user-event": "^14.1.1", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.25", | ||
"@types/react": "^18.0.6", | ||
"@types/react-dom": "^18.0.2", | ||
"react-redux": "^8.0.1", | ||
"typescript": "^4.6.0", | ||
"web-vitals": "^2.1.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": ["react-app", "react-app/jest"] | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './App'; | ||
import { store } from './app/store'; | ||
import { createRoot } from 'react-dom/client'; | ||
import { Provider } from 'react-redux'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import { store } from './app/store'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
import './index.css'; | ||
|
||
const container = document.getElementById('root')!; | ||
const root = createRoot(container); | ||
|
||
ReactDOM.render( | ||
root.render( | ||
<React.StrictMode> | ||
<Provider store={store}> | ||
<App /> | ||
</Provider> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
</React.StrictMode> | ||
); | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
// Learn more about service workers: https://bit.ly/CRA-PWA | ||
serviceWorker.unregister(); | ||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | ||
reportWebVitals(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ReportHandler } from 'web-vitals'; | ||
|
||
const reportWebVitals = (onPerfEntry?: ReportHandler) => { | ||
if (onPerfEntry && onPerfEntry instanceof Function) { | ||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { | ||
getCLS(onPerfEntry); | ||
getFID(onPerfEntry); | ||
getFCP(onPerfEntry); | ||
getLCP(onPerfEntry); | ||
getTTFB(onPerfEntry); | ||
}); | ||
} | ||
}; | ||
|
||
export default reportWebVitals; |
This file was deleted.
Oops, something went wrong.