gorhom / react-native-paper-onboarding

Paper Onboarding is a material design UI slider for `React Native`.
MIT License
856 stars 51 forks source link

Add next/previous screen and close functions #33

Closed tomkelsey closed 3 years ago

tomkelsey commented 3 years ago

Feature Request

Add new functions that could be passed in PageContentProps to trigger the next or previous screen and to close the onboarding entirely. My understanding is people could then use these in their own custom content components.

Why it is needed

We've noticed a fair few people installing our app and then uninstalling from the onboarding screen. We wonder whether some of these people either:

a) Don't realise they need to swipe to progress to the next screen; or b) Swipe to the final screen but don't notice/see the "Close" button in the top right

Possible implementation

I've had a stab at implementing this myself (in the hope of submitting a PR) but I'm not at all familiar with animations or gestures and I've ended up very confused. I'm afraid I don't have any useful suggestions right now!

Code sample

As above - sorry!

If anyone could point me in the right direction as to how this might be implemented I'd be happy to give it a go :)

PS. Great job with this project! 👍

gorhom commented 3 years ago

i have added next and previous public methods that can be access using react ref, it is out with v1.2.0

tomkelsey commented 3 years ago

@gorhom - Amazing, thank you very much :)