-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't mutate style object passed onto createClass
#11
Comments
Yeah - I had it return the className but didn't want to break the current API |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently a
className
field is added. We shouldn't do that. Except the current API relies on it.This makes inserting style inline hard. Here's a tentative new API:
createClass(styleObj)
returns a new object of the following format:This way, if you decide to do inline style (in React), you can:
<div style={styleObj.style}
/>. It gets trickier with pseudo-selectors though. Good thing I haven't pushed the pseudo-selectors release yet.The text was updated successfully, but these errors were encountered: