oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.46k stars 452 forks source link

Update Collapsible.js with useNativeDriver which allows parallel process #267

Closed zoiec closed 3 years ago

zoiec commented 5 years ago

This PR continues with the changes made in https://github.com/oblador/react-native-collapsible/pull/235 with merge conflicts resolved.

With this change, animations can run parallel to other processes taking place such as AWS AppSync queries or mutations

iRoachie commented 5 years ago

Hey @zoiec as per my last comment in the previous issue i wanted to know if they were any measurable performance improvements/observations over the current implmentation

prscX commented 5 years ago

Hi: Can someone please look into this PR. I hope it will boost animation performance.

Thanks </ Pranav >

bneigher commented 5 years ago

@iRoachie - while it's true that having benchmarks on the performance improvements is nice, in this case I think it should suffice to merge this as it is a fact that not sending the animation across the bridge leads to poorer performance. Even if a measurable speedup is marginal, the parallel nature of how sending animations to the native engine is a strong enough case to accept this as an update.

I'm using this fork over the official because of it, but would like to keep using this official module.

Cheers

zaptrem commented 5 years ago

Interested in this change. Anything keeping it from being merged?

sourcecode911 commented 4 years ago

+1 @oblador

oblador commented 3 years ago

Hi, the useNativeDriver option was not provided to the right animation so in essence it doesn't change anything. Unfortunately it doesn't work on layout properties such as height, so if you pass it to the right place it crashes. Using something like react-native-animated would work though. Closing this for now.