DEV Community

loading...

Discussion on: Learning how to be lazy in React: A guide for beginners.

Collapse
chico1992 profile image
chico1992

Seriously i think this is bad advice since this will only polute the dom to add some margin. If you want to be lazy just use some css utility classes to add the class that has the right margin that you want and keeps your dom clean and keeps your margins consistent

Collapse
itz_giddy profile image
Audiophile Author

You are right chico. I have updated the side note section to point this out. I was really thinking of the simplest way to convey the concept of reusable components and I couldn't find a simpler example at the time of writing this. Thanks for pointing it out!

Collapse
chico1992 profile image
chico1992

Actually i was talking about the useless div’s that the spacer component produces
And i know it’s hard to find a good and easy example to explain this concept

Thread Thread
itz_giddy profile image
Audiophile Author

Oh okay, I get you now