xyflow / xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.
https://xyflow.com
MIT License
22.07k stars 1.46k forks source link

`you've created a new nodeTypes or edgeTypes` - troubleshooting#002 - React Strict Mode #3923

Open avloss opened 4 months ago

avloss commented 4 months ago

Please describe the feature that you want to propose

Perhaps it's worth mentioning on https://reactflow.dev/learn/troubleshooting#002 page, or perhaps even in the error itself that reactStrictMode will cause this regardless of any other settings.

Please note: https://nextjs.org/docs/pages/api-reference/next-config-js/reactStrictMode

Good to know: Since Next.js 13.4, Strict Mode is true by default with app router, so the above configuration is only necessary for pages. You can still disable Strict Mode by setting

And given how popular Next.js is, it'll be only expected that people will encountering this problem quite often when trying to use your great React component.

moklick commented 1 month ago

This is fixed in 12.0.0-next.18