#reactnative
question: is this an acceptable way to use RNGH? I don't want the identity of `nativeGesture` to change, so as `drawerGesture` changes I just keep adding them endlessly in an effect
seems cursed but fixes a gnarly perf problem!
If the drawer changes frequently this could be a problem. The native gesture will be accumulating all the previous drawer gesture references which may become too big. It actually only keeps the id so each one wont contribute a lot but if it grows indefinitely it could be a problem
1 1Another way to do it is to keep the drawer gesture references which may stable too with useMemo and only co figure it once. You can reassign the gesture instance to new components and I think you should be able to event have it used in two different components at the same time
1 1Can’t you make the reference stable with useMemo though and just reconfigure it when needed?
1 1Samuel
@samuel.fm
oh interesting. if you call onEnd again, does it replace the old one?
1