From bc2d90760472fd414c969c0304ab3b1d66a47847 Mon Sep 17 00:00:00 2001 From: Isaac Batista Date: Sat, 30 Sep 2023 23:12:01 -0300 Subject: [PATCH] docs: add sortable nextjs usage --- presets/sortable/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/presets/sortable/README.md b/presets/sortable/README.md index 1cf674b..dcfe149 100644 --- a/presets/sortable/README.md +++ b/presets/sortable/README.md @@ -763,3 +763,15 @@ export const Item = forwardRef(({id, ...props}, ref) => { ``` {% endtab %} {% endtabs %} + +## Usage with Next.js + +We need to define an unique ID to `DndContext`: + +```jsx +import {useId} from 'react'; + +function YourComponent() { + const id = useId() + return +}