-
Notifications
You must be signed in to change notification settings - Fork 194
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
Doesn't play nice with styled components #25
Comments
I think I know what's going on here... The interpolator system needs to get information about the items from somewhere, and that somewhere is the style property. When providing function based components the style is not available until the item function has been called. This will result in the issue you are having with the background color. The other thing the example shows is the strange size transition - that should not look like what you see and I'll take a look at it and see what if I can find out what's going on. |
If you add the following style to the outer container view, the size transition seems to be working:
The problem seems to be that the |
I've seen similar things happen when you have items that take up percentage width. My fix has usually been to insert an invisible item that has the window width, but it'd be great for the library's |
@chrfalch This explains it. Maybe we can fix this by adding a |
@dcvz In general, animations in React Native don't work well with percentages (typically they would throw). |
Revisiting this again I think supporting styled components is not an essential thing to have, I like the direction the development is going, let's keep it that way for now. |
@sonaye The last version in develop now supports retrieving rendered props from components like the one you wrote - just mentioning it you'd like to try :-) Haven't released it yet. |
I found that this library renders glitchy animations when using
styled-components
,glamorous-native
or a custom styled components API, switching to the typical way of writing styles in RN fixes things. I wrote a light custom styled-components-like function to do some debugging.Top: Not using styled components.
Bottom: Using styled components.
Code to reproduce available here.
The text was updated successfully, but these errors were encountered: