Shaddix / dnd-kit-sortable-tree

Tree component for React with ability to drag-and-drop items throughout the tree. Based on an example from dnd-kit (https://github.com/clauderic/dnd-kit).
MIT License
91 stars 22 forks source link

error - ReferenceError: navigator is not defined #5

Closed eshaffer321 closed 2 years ago

eshaffer321 commented 2 years ago

I am not able to use the example in next.js with SSR.

error - ReferenceError: navigator is not defined

Steps to reproduce

  1. npx create-next-app@latest
  2. Install dnd-kit-sortable-tree
  3. Copy example from README.md

Is there support for SSR?

eshaffer321 commented 2 years ago

This guide was able to help solve the issue. https://www.youtube.com/watch?v=KecDqkKt3HI