Skip to content

Conversation

@thomasuster
Copy link

test

Tasks

Adopt new hooks

Adopt the useSyncExternalStore and useInsertionEffect hooks introduced in React 18

Instructions

  • Replace any CSS-in-JS style injections in render with useInsertionEffect
    • apps/meteor/client/views/omnichannel/businessHours/BusinessHoursRouter.js
    • packages/livechat/src/components/Screen/index.js
    • packages/livechat/svg-component-loader.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
    • apps/meteor/client/startup/appRoot.tsx
    • packages/uikit-playground/src/main.tsx

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/Rocket.Chat/apps/meteor/client/providers/CallProvider/CallProvider.tsx: migrations/test/switchkeep/Rocket.Chat/apps/meteor/client/providers/CallProvider/CallProvider.tsx for task: Update Client Rendering APIs, step: If using render imported from react-dom, replace it with createRoot exceeds 2000 tokens and not currently supported.

Adopt new hooks

Adopt the useSyncExternalStore and useInsertionEffect hooks introduced in React 18

Instructions

  • Replace any CSS-in-JS style injections in render with useInsertionEffect
    • migrations/test/switchkeep/Rocket.Chat/apps/meteor/client/views/admin/users/UserForm.js: migrations/test/switchkeep/Rocket.Chat/apps/meteor/client/views/admin/users/UserForm.js for task: Adopt new hooks, step: Replace any CSS-in-JS style injections in render with useInsertionEffect exceeds 2000 tokens and not currently supported.

    • migrations/test/switchkeep/Rocket.Chat/apps/meteor/client/views/admin/import/NewImportPage.js: migrations/test/switchkeep/Rocket.Chat/apps/meteor/client/views/admin/import/NewImportPage.js for task: Adopt new hooks, step: Replace any CSS-in-JS style injections in render with useInsertionEffect 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.

2 participants