react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

[Bug]: useActionState example compilation error

Open gbtron opened this issue 1 year ago • 0 comments
trafficstars

Summary

The example code under the Usage section does not compile in the preview canvas because the react and react-dom packages do not match. To ensure they are not out of sync, they can be pinned to the same version in the package.json file instead of pulled using the "canary" tag.

Page

https://react.dev/reference/react/useActionState#usage

Details

Error Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:

  • react: 19.0.0-rc-8269d55d-20240802
  • react-dom: 19.0.0-rc-65903583-20240805 Learn more: https://react.dev/warnings/version-mismatch

gbtron avatar Aug 06 '24 14:08 gbtron