Skip to content
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

Add useNativeDriver to improve performance #32

Closed
ghost opened this issue Dec 12, 2017 · 3 comments
Closed

Add useNativeDriver to improve performance #32

ghost opened this issue Dec 12, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2017

Hello, thank you for this wonderful module. I believe there are a couple lines of code that can be added to this project that will significantly speed up the performance for most use cases without any backwards incompatible changes to the code base. The single caveat being that you may have to limit support for the next version of the module to version >=0.40 of React Native. I can easily submit a PR for this if desired (just tell me if there are specific conventions such as commit message policies).

Docs from Facebook:
https://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html

Example from competing module:
zeljkoX/react-native-loading-placeholder@05b4cd6

@mfrachet
Copy link
Owner

Hey :D

I'm happy you like the module :)

The idea seems interesting. I've created a PR (#33) concerning the fade animation (that relies on opacity and that can be managed from the native lands)

For now, I can't apply this to the shine animation that relies on a marginLeft style transitions.

Maybe more investigations / refacto of the shine animation to use transform style property could be a good idea :). (see this for more information concerning useNativeDriver caveats)

@ghost
Copy link
Author

ghost commented Dec 12, 2017

Thank you for the quick response and good catch with the caveats section, I'll be sure to update and use the new version soon. You can close this issue at any time appropriate.

@mfrachet
Copy link
Owner

Closed with #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant