-
Notifications
You must be signed in to change notification settings - Fork 102
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
[Example] Could we get an example with CRA #62
Comments
Hey @rileybracken, you need to import the ReactDOM version like so: import Animated from 'animated/lib/targets/react-dom'; |
oh, I started a workaround by doing this:
To me it is a lot cleaner. Edit: |
@rileybracken this is possible. However just like |
I think the main reason there is no example (and haven't pushed for one) is that this library isn't prime time or production ready (I mostly mean for the web, for RN it's great). If anything would probably spin up a separate repo to show off examples vs including in this repo. Could probably pull https://github.com/animatedjs/interactive-docs and switch it over to CRA |
my main issue with this
is that I have to remember it, if I am creating a ton of components that have I would rather type more and be more explicit as to what and why I am doing it, instead of just typing more. That might not make much sense, but it does to me 😄 . |
Oh I'm totally with you, typing that out or even creating a snippet is a bit nuts. Back to the definite not prime time point haha Also I think we can potentially set that up in the |
Yeah pointing Animated in the It seems like setting that up is the easiest solution. It is almost so easy that it makes me skeptical. Is there a reason why it isn't currently done that way? With just the eyeball test it seems like this would break RN. If I did this and made a PR would it break something, I guess I could test it in RN and React. |
@rileybracken This isn't use for RN internals. This is a copy. RN looks at the |
@rileybracken and @browniefed Just a heads up on this, if you use .createAnimatedComponent() for this, it does not recognize or add the transforms to the element style, but will add other styles. I tried the |
@paigecwilley This is good to point out. You can check out the implementation of why here https://github.com/animatedjs/animated/blob/master/src/targets/react-dom.js#L25 |
@paigecwilley good to know on those transforms, I edited my comment above that recommends Yeah I think good next steps for this would be to:
@browniefed I could probably start this today and finish 1 and 2, then create separate PR's. |
@rileybracken Yes. However the structure of a transform in RN looks like
Which is why inject custom |
I think it would be super useful to have a Create React App example of this available. I started creating one but I am running into problems with React-Dom
And I am getting this error, what am I doing wrong?
The text was updated successfully, but these errors were encountered: