Skip to content

React 18: useId usage results in hydration mismatchΒ #30876

Closed
@eps1lon

Description

@eps1lon

What version of Next.js are you using?

12.0.2 and 12.0.3-canary.2

What version of Node.js are you using?

12.22.6

What browser are you using?

Version 95.0.4638.54 (Official Build) (64-bit)

What operating system are you using?

Ubuntu 20.04.3 LTS

How are you deploying your application?

next dev

Describe the Bug

React version: 18.0.0-alpha-00ced1e2b-20211102
Render a component using React.useId

Expected Behavior

No hydration mismatch

To Reproduce

$ git clone https://github.com/eps1lon/next-react-18-useid.git
$ cd next-react-18-useid
$ yarn
$ yarn dev
# Open http://localhost:3000/
# Hydration mismatch (see console)

Also reproduces with [email protected], reactStrictMode = false and experimental.concurrentFeatures = true

Metadata

Metadata

Assignees

Labels

bugIssue was opened via the bug report template.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions