|
|
|
|
|
by 88913527
1630 days ago
|
|
I mostly agree with this, but I would add a secondary construct on top of it. Sometimes you want collections of things to appear identical. You might want a component, that as part of its own public API, abstracts away the usage of the spacing component (author calls this "Stack"). Ex: suppose you have a list of images and you always want them to be 8px apart. So you package up the Stack and an <Image /> component, that takes an images[] array. This prevents the issue where engineers use the raw Stack+Image "atom" components and define random spacing rules: say the spec is 8, some engineers use 6, others 10, etc-- then you have inconsistent spacing in your app. |
|