2 ms·
Looks nice, but I use React. Anyone know of something comparable for React?
by lobster_johnson 11y ago
Looks nice, but I use React. Anyone know of something comparable for React?
- _felics 11y agoThis library seems to provide most of the functionality: https://github.com/STRML/react-grid-layout https://github.com/STRML/react-grid-layout
- watty 11y agoExcept the author hang had a stable release in months. Apparently is working on a rewrite but is doing so privately despite several offering support.
- szdszdszd 11y agoGridifier was designed specially for use with Backbone/Angular/React. We were using Backbone for our apps, but we will definitely look how to sync it with Angular/React. It was too heavy BTW - so the most logical step was to rewrite it completely at first, and after that start creating tutorials+codepens.
- lobster_johnson 11y agoReact operates completely differently from Backbone and Angular. I've looked only briefly at your code, but it looks like it operates directly on the DOM, which is not going to work with React.
- szdszdszd 11y agoHmmm, I haven't tried React yet. Yeah, now it operates directly on the DOM, but all functions for DOM manipulation are located in separate class, so maybe we will try hook them somehow. Looked at React docs really quickly, it seems they have been abstracted away DOM manipulation to prevent unnecessary browser reflow/recalc ops. So, I can't predict now how easily it will be to sync it with React.(we will try to do it)
- lobster_johnson 11y agoActually, the virtual DOM isn't to prevent unnecessary operations, it's to ensure consistency. State transitions cause a render, which builds the virtual DOM (for each component) from scratch, ensuring that the same state always results in the same rendering output. This is different from, say, Backbone, where you create or modify individual DOM elements, and this logic is typically spread out across many functions.
- deleted 11y ago[deleted]
- arstin 11y agoIt's not an exact comparison, but this is in the ballpark. https://github.com/FormidableLabs/react-shuffle https://github.com/FormidableLabs/react-shuffle
- lobster_johnson 11y agoNot too bad, thanks. Doesn't have mouse-base drag and drop, unfortunately, and seems not to animate deleted children? I also like react-grid-layout's support for bin-packing lots of different cell sizes ("masonry"-style). This one seems to require fixed widths and heights.