react-native-hold-menu
react-native-hold-menu copied to clipboard
Add an ability to have custom preview
This PR adds an ability to pass custom implementation of the preview component.
https://github.com/enesozturk/react-native-hold-menu/assets/7031578/ed8b603d-e9ae-4aca-af7d-e95633532678
TODO:
- [ ] Cleanup the code
- [ ] Document the changes
- [ ] Understand the best way to have nice animation of reactions once it's hiding from the view.
OHHH I LIKE THIS!! I was trying to add some kind of 'willOpen' property but it needs be synchronously awaited before calculating the size of the component
Don't have time to fully finish this one in the short term future, if anyone wants to continue let me know.
hi all, I just want to ask a question:
I saw the lib render {children} 2 times like this:
<GestureHandler>
<Animated.View ref={containerRef} style={containerStyle}>
{children} => HERE
</Animated.View>
</GestureHandler>
<Portal key={key} name={key}>
<Animated.View
key={key}
style={portalContainerStyle}
animatedProps={animatedPortalProps}
>
<PortalOverlay />
{children} => HERE
</Animated.View>
</Portal>
So does performance better?