Skip navigation
We built this onboarding flow in React Native that feels better than most native apps
0:00 / 0:25

We built this onboarding flow in React Native that feels better than most native apps

Baran

@barany6m4.5K followers

Visit on X
2,615 likesDownloadOriginal post

230,919 views

We built this onboarding flow in React Native that feels better than most native apps Here’s how we did it: ① Patched react-native-screens for a custom transition ② Button and stepper are rendered on top of the stack ③ Synced button state across screens via context The button and header are positioned absolutely above the stack. When a screen focuses, it updates the shared button state (text, disabled state) via context The hardest part is keeping the keyboard open during screen transitions. We solved it with hidden TextInputs that get focused programmatically before navigating The result: one button flows across every screen and surfs the keyboard

35 Comments

Comments from the original post on X (Twitter)

  • Marc's profile picture

    @marc_r_all

    why not a single screen, with step body components?

    49 likes

  • Ludwig Vaan's profile picture

    @ludwig_vaan

    Did you try to achieve this result using a pager view? Switching screens isn’t mandatory

    24 likes

  • Gabriele Scotto di Vettimo's profile picture

    @gabsdv

    Super impressive! Do you mind if I share it with the react native community?

    12 likes

  • Yehia's profile picture

    @yehiaabdelm

    Could do it with a flatlist with pagingEnabled

    9 likes

  • Ant Setiadi's profile picture

    @hi_antz

    Impressive! It is really smooth. Are you guys using expo-router or react-navigation?

    8 likes

  • MT⚡️'s profile picture

    @tmknsm

    09:41 🧐

    8 likes

  • Mick's profile picture

    @mickdewald

    Beautiful! Is there a chance to open source this?

    7 likes

  • Conor's profile picture

    @conor620

    Beautiful attention to detail. Worked on an identical flow but couldn't figure out how to keep keyboard open. Thanks for the tip!

    4 likes

  • Constantin 🔥's profile picture

    @constantout

    I've recently tried to build a good onboarding, but this is just next-level.

    2 likes

  • Ryan O'Hara's profile picture

    @ryanohara_

    Damn that’s smooth! Nice work

    2 likes

  • Kyle's profile picture

    @kylekane

    Looks great

    2 likes

  • Billel Boudchicha's profile picture

    @BillelNorm

    Built a similar multi-step wizard but kept everything in one screen. Used Reanimated for smooth left↔️right transitions and XState FSM to drive the whole flow. Header & button are absolutely positioned too. Your keyboard-surfing trick is 🔥 — super fluid work 👏

    2 likes

  • Ivan Ry's profile picture

    @ivryb

    That's my exact problem with React Native after trying it for one month. Brother could write this flow in 2 hours in native code instead of spending time on all this React Native dancing...

    2 likes

  • pedro's profile picture

    @adhambadr2

    code plzzz ?

    2 likes

  • Shreya Mishra's profile picture

    @shreya1mishra

    How exactly did you patch react-native-screens to implement the custom transition? Can you share key code snippets or explain the approach?

    2 likes

  • JGF's profile picture

    @comvicts

    clean

    2 likes

  • Abhijeet Sharan's profile picture

    @abhijeetsharan_

    Looks smooth

    1 like

  • Mayor's profile picture

    @notevenclose99

    Love it

    1 like

  • ª's profile picture

    @alecinodag

    @datboychapo

    1 like

  • Davide Espertini's profile picture

    @despertini

    wow! really impressive work!

    1 like