173
rated 0 times
[
174]
[
1]
/ answers: 1 / hits: 25974
/ 6 Years ago, thu, september 27, 2018, 12:00:00
When using styled-components
to style a custom functional react component, the styles are not being applied. Here is a simple example where the styles are not being applied to the StyledDiv
:
const Div = () => (<div>test</div>)
const StyledDiv = styled(Div)`
color: red;
`;
What is the best way to make sure that the styles get applied correctly?
More From » reactjs