is using react 18 with payload okay?

default discord avatar
kris0x
5 months ago
1

I am using payloadcms and need to build some custom react components. I suppose I need to add react as dependency to package.json?



Is using react 18 okay? so far I don't have problems, but my package manager gives me this warning



services/cms
└─┬ payload 1.7.1
  ├─┬ react-diff-viewer 3.1.1
  │ ├── ✕ unmet peer react@"^15.3.0 || ^16.0.0": found 18.2.0 in payload
  │ └── ✕ unmet peer react-dom@"^15.3.0 || ^16.0.0": found 18.2.0 in payload
  └─┬ react-select 3.2.0
    ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0 in payload
    ├── ✕ unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0 in payload
    └─┬ react-input-autosize 3.0.0
      └── ✕ unmet peer react@"^16.3.0 || ^17.0.0": found 18.2.0 in payload

Done in 1m 6.5s
  • discord user avatar
    jesschow
    Payload Team
    2 months ago

    Hi @kris0x yes React 18 can be used with Payload, you shouldn't be affected by those unmet peer dependency warnings

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.