Skip to content

test: Upgrade react to 18 on branch smartshift-thomasuster-1690922820#47

Open
thomasuster wants to merge 4 commits intomainfrom
smartshift-thomasuster-1690922820
Open

test: Upgrade react to 18 on branch smartshift-thomasuster-1690922820#47
thomasuster wants to merge 4 commits intomainfrom
smartshift-thomasuster-1690922820

Conversation

@thomasuster
Copy link
Copy Markdown
Contributor

test

Tasks

Handle Deprecations

Several ReactDOM methods have been deprecated in React 18

Instructions

  • Replace ReactDOM.render with ReactDOM.createRoot
    • src/App.test.js
    • src/index.js

Update Client Rendering APIs

React 18 introduces a new root API which provides better ergonomics for managing roots. The new root API also enables the new concurrent renderer, which allows you to opt-into concurrent features.

Instructions

  • If using render imported from react-dom, replace it with createRoot
    • src/App.test.js
    • src/index.js

Upgrade react

Instructions

  • Run package commands to upgrade react
    • migrations/test/switchkeep/sample-react17-app/package-lock.json
    • migrations/test/switchkeep/sample-react17-app/package.json

Errors

Update Client Rendering APIs

React 18 introduces a new root API which provides better ergonomics for managing roots. The new root API also enables the new concurrent renderer, which allows you to opt-into concurrent features.

Instructions

  • If using render imported from react-dom, replace it with createRoot
    • migrations/test/switchkeep/sample-react17-app/src/TooBigFile.js: migrations/test/switchkeep/sample-react17-app/src/TooBigFile.js for task: Update Client Rendering APIs, step: If using render imported from react-dom, replace it with createRoot error: exceeds 2000 tokens and not currently supported.

Handle Deprecations

Several ReactDOM methods have been deprecated in React 18

Instructions

  • Replace ReactDOM.render with ReactDOM.createRoot
    • migrations/test/switchkeep/sample-react17-app/src/TooBigFile.js: migrations/test/switchkeep/sample-react17-app/src/TooBigFile.js for task: Handle Deprecations, step: Replace ReactDOM.render with ReactDOM.createRoot error: exceeds 2000 tokens and not currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant