Open
Description
I tried using click-ui with the latest version of NextJS 15 and I'm getting this error when accessing the page.
⨯ TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at (ssr)/./node_modules/@clickhouse/click-ui/dist/click-ui.es.js (.next/server/vendor-chunks/@clickhouse.js:20:1)
at __webpack_require__ (.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(ssr)/./components/Main.tsx:7:78)
at (ssr)/./components/Main.tsx (.next/server/app/page.js:130:1)
at Object.__webpack_require__ [as require] (.next/server/webpack-runtime.js:33:43) {
digest: '38619909'
}
Steps to reproduce
- Create a new NextJS project:
npx create-next-app@latest
. Use defaults value for every question. - Install
click-ui
and dependencies:yarn add @clickhouse/click-ui styled-components dayjs
- Add a
Main.tsx
component, and import it inpage.tsx
"use client"
import { ClickUIProvider} from '@clickhouse/click-ui'
export default function Main() {
return (
<ClickUIProvider theme={'dark'} >
<div>Test</div>
</ClickUIProvider>
)
}
- Run the application:
yarn dev
Application starts fine, but throws the error when loading the main page. Downgrading to NextJS 14 / React 18 fixes the issue.
Metadata
Metadata
Assignees
Labels
No labels