Open cesarquiroz opened 4 years ago
Currently the template component must be a class-based React component. In the future, I plan on making it so DraggableList follows a render-props pattern instead of taking in a component as a prop, which will avoid this issue of requiring a class-based React component, and will solve some issues inherent to taking a component as a prop.
ok thanks!! :)
Hi @Macil , can current version support functional component as the template component?
can current version support functional component as the template component?
@DanielChen93 as of react-draggable-list@4.0.2
, the answer seems to be no.
is there any plan to support functional programming and React hooks for this component? I really want to use it, and we made it work with us implementing React hooks, but now we are getting a warning in the console:
and is happening because of this section of code:
Plus this causes another warning:
because the template item is not being rendered with a unique key.
Thanks