coleturner / react-components Goto Github PK
View Code? Open in Web Editor NEWReact components and other various shortcuts that I frequently use.
License: MIT License
React components and other various shortcuts that I frequently use.
License: MIT License
Good Morning
I read your article "Masonry in React: A Performance Hell" and I'm trying to use the components but I'm not getting it because it seems like some dependencies are missing. Do you have any examples using Masonry to help me?
Edson Martins
Brasil
Hello, first thank for great article and example code of masonry.
I need exactly component like this in my project. It is possible to use it from this example code which you have in repository?
Hi! Thanks for the write up and great component!
I'm in the process of converting this into TypeScript for a project where I'll be using it. Perhaps I don't quite understand the code, but it seems there's a possible bug on the following line and the line below it:
react-components/Masonry/View.jsx
Line 258 in 3ed900f
As I understand, columnGap
is of type number[][]
, so for example [[0, 1], [2, 4]]
. However in the above line the filter
method is applied to the inner array here columnGaps[item.column + index].filter(...)
and so it is traversing the number values of columnGap
at a specific index. Therefore the array destructuring on the next line is invalid: const [gapTop, gapHeight] = gap;
, since gap
here is of type number
, not Array
.
In the code for the Masonry component, in line 147, the variable component
is never defined.
Hi Patrick! I had copy and paste "View.jsx" in my project. Then install meteor npm install --save classnames lodash.throttle
Then, i import the component and get that error: Uncaught TypeError: Cannot read property 'isRequired' of undefined at Masonry.jsx (Masonry.jsx:88)
i am getting undefined error on itemComponent.
the code from view.jsx
`const componentName = itemComponent.type.displayName || itemComponent.type.name;`
if you can explain MyMasonryItem
class it would be really helpful right now
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.