Skip to content

Chakra UI set up is incompatible with initial project template #5601

@djaustin

Description

@djaustin

Creating a new project with yarn create redwood-app <name> followed by setting up the project with Chakra UI causes errors in the web project.

It seems that the version of Chakra being installed by the setup CLI is dependent on useId from React which was only introduced in React 18.

Upgrading React to version 18 in the web project seems to resolve this.

Steps to reproduce

  1. yarn create redwood-app chakra-test
  2. cd chakra-test
  3. yarn rw setup ui chakra-ui
  4. yarn rw dev

Expected outcome

The Redwood welcome page is displayed

Actual outcome

An error is thrown

Uncaught TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.startTransition) is not a function
    at ref (chakra-ui-react-env.esm.js:137:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
    at invokeGuardedCallback (react-dom.development.js:4056:1)
    at safelyDetachRef (react-dom.development.js:20435:1)
    at commitUnmount (react-dom.development.js:20959:1)
    at commitNestedUnmounts (react-dom.development.js:21004:1)
    at unmountHostComponents (react-dom.development.js:21290:1)
    at commitDeletion (react-dom.development.js:21347:1)
    at commitMutationEffects (react-dom.development.js:23407:1)

image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions