How to implement Packery with react JS ?

2.5k Views Asked by At

I have a few react components that I would like to put on the grid with some gutter. These react components should have drag and drop functionality. The grid should relayout once the drag and drop is complete

1

There are 1 best solutions below

0
Dylan Nirvana On

I am working with a similar problem. I don't know if you have solved this. (If you did of course, please share your solution so as to help others!). This is one of the numerous Packery for React npm modules I found. Most are fairly similar.

Here is the results of my research thus far (certainly not complete!)

David Desandro

This approach requires React with jQuery via lifecycles https://reactjs.org/docs/integrating-with-other-libraries.html

React Packery (various)

In my case, this presents a TypeError. I have to rewrite component to refer to a fn rather than call it (note curly braces). (All the examples are copy-pasted and present only one use-case. Not terribly helpful.)

React DnD

Too verbose to say the least. But if you have time to configure it...

CSS Tricks

Not verbose enough perhaps