Skip to content

DatePicker raises hydration error on Next.js with React Strict Mode #2541

@ryan5500

Description

@ryan5500

I found SequencePrefixIdProvider provided at here, and used around DatePicker component like this.

# at pages/index.js
 import { DatePicker, SequencePrefixIdProvider } from 'smarthr-ui';

  export default function Home() {
    return (
      <SequencePrefixIdProvider>
        <DatePicker />
      </SequencePrefixIdProvider>
    )
  }

but it raises hydration error like this.
image

Versions

I use those libraries.

    "next": "12.1.6",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "smarthr-ui": "21.1.0",

How To Reproduce

Related Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions