3 ms·
If you avoid them at component definition time and only inject them when using a component, things should be fine.
by k__ 7y ago
If you avoid them at component definition time and only inject them when using a component, things should be fine.
- crooked-v 7y agoA simple example with React would be anything using the rebass library (https://rebassjs.org https://rebassjs.org). You can extend its Box/Flex components or do a pass-through (e.g. `({a, b, ...rest}) => <Box {...rest}>{... your stuff here ...}</Box>`), at which point when using your own component you can do `<MyComponentHere marginLeft="0.5em"/>` and have native CSS margins without embedding them into the component or into stylesheets for the component.