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
26.27k stars 1.69k forks source link

React does not recognize the `maxConnections` prop on a DOM element - ReactFlow #3366

Closed rishabhgist closed 1 year ago

rishabhgist commented 1 year ago

Describe the Bug

While I am trying set maxConnections Prop for a node I am getting react error by using the template on - https://reactflow.dev/docs/examples/nodes/connection-limit/

error

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Add Template from - https://reactflow.dev/docs/examples/nodes/connection-limit/

Expected behavior

Can anyone help me on this issue ?

Screenshots or Videos

No response

Platform

Additional context

No response

hayleigh-dot-dev commented 1 year ago

Hey there thanks for this, looks like a simple bug in the example :) If you're copying the example directly just destructure maxConnections from the props first:

const CustomHandle = ({ maxConnections, ...props }) => {
  ...

I'll fix the example now.