Closed moretti closed 9 years ago
@spicyj changed to 4 spaces, sorry. Tough day :smiley:
@moretti as a heads-up I think this looks good now, but I'll need to figure out how to make this work with our internal javascript bundling / module resolver.
Thanks @joelburget, updated with an arrow function
Is this likely to get pulled in?
I'm pretty eager to have this too.
Hey all,
Thanks for the pull request and support. I'd like to get this pulled in if we can.
Unfortunately, in the current state I can't merge this yet. Reaching into the react internal files only works if the entire app is using browserify/webpack (or in node/io.js), and doesn't work if people are using react as a single file [minified] library. Currently this is how we integrate react, which is not likely to change but might be possible.
Secondarily, this depends on React not changing their internal implementation, which is unideal.
Since we're only using CSSCore for adding/removing classes, maybe we could implement this without the CSSCore dependency or jQuery? Or pull in the appropriate code into react-components?
I'm also open to looking into how we integrate React such that such requires work, but that is likely to be on a longer timeframe (and requires modifying a lot more than just react-components).
Thanks, Aria
As a Browserify user, that hadn't occurred to me, but I would be happy to make a new PR with no dep on CSSCore (straight up vanilla-js).
@devgeeks awesome; I'd be happy to merge that!
It may be easier to just embed CSSCore.js into react-components:
https://github.com/facebook/react/blob/master/src/vendor/core/CSSCore.js
(Perhaps with the calls to invariant
changed.)
(I'm okay with that too!)
Maybe that's the approach I will use. Basically include CSSCore
, but with normal error handling instead of invariant
.
Hi! Thanks for doing this! I'll add a couple of comments inline.
Er... on #31 :). I'm going to close this PR in favor of #31. Thanks everyone for contributing and the discussion.
@spicyj Thanks, I've updated it in my fork