-
Hello,
and:
At the moment the call is in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, that seems to be a hard one. Everything your did is according to the documentation and solutions I could find. Unfortunately, somehow it doesn't work :-/ There are open issues regarding this topic with One comment suggests it might be a conflict with react strict mode. My experience with this library und my quick testing doesn't confirm this idea. The common solution seems to be, that components using dnd should be rendered on the client only, not the server. There are different approaches to this, but an easy solution with Next.js are dynamic imports with the https://nextjs.org/docs/advanced-features/dynamic-import const DragList = dynamic(() => import('../components/DragList'), {
ssr: false,
})
export default function CreateList() {
return (
<>
<h1>Wähle aktuelle Aufgaben </h1>
<StyledContainer>
<DragList />
</StyledContainer>
</>
) export default function DragList() {
// [...] useStore, useState, etc.
return (
<DragDropContext onDragEnd={handleOnDragEnd}>
{columns.map(column => /* [...] */)}
</DragDropContext>
)
} |
Beta Was this translation helpful? Give feedback.
Okay, that seems to be a hard one.
Everything your did is according to the documentation and solutions I could find. Unfortunately, somehow it doesn't work :-/
There are open issues regarding this topic with
react-beautiful-dnd
:atlassian/react-beautiful-dnd#1854
atlassian/react-beautiful-dnd#2175
One comment suggests it might be a conflict with react strict mode. My experience with this library und my quick testing doesn't confirm this idea.
atlassian/react-beautiful-dnd#1854 (comment)
The common solution seems to be, that components using dnd should be rendered on the client only, not the server.
There are different approaches to this, but an easy solution with Next.js are dynamic impor…