Open kopax opened 5 years ago
Beside that, I have a question regarding css
props.
I am using css={csscolor: red;
} and not css={'color: red;}
, every where in my code, while in the documentation they do not say to use it.
I thought it was supposed to be used, I've seen that when the css props was released in some source code.
What is the css
util for then? I can notice that without it, my IDE (IntelliJ) lose the synthax coloration.
Because of how the css prop transpiler works I don't think we'll ever be able to support this. The css prop dynamically generates a new component, which is injected into the global scope. Up there the prop isn't available as a variable so that's why you're seeing the error.
The only way we could support this is to create a new component inside the local component scope which means it'd get recreated over and over on render, which is pretty bad for performance.
css does not work
I have the following app with a non ejected create react app:
Expect
To have a valid synthax
Result
Even if the class is not instanciated anywhere in the code, it will crash.
css
props is removed, it can build again.css
props on the<div>
and it will work, is it because css cannot work with props?Versions