跳过导航
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

@barany6m4545 位关注者

在 X 上查看
2,615 个赞下载原帖

230,919 次观看

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 条评论

评论来自 X (Twitter) 上的原帖

  • Marc 的头像

    @marc_r_all

    why not a single screen, with step body components?

    49 个赞

  • Ludwig Vaan 的头像

    @ludwig_vaan

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

    24 个赞

  • Gabriele Scotto di Vettimo 的头像

    @gabsdv

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

    12 个赞

  • Yehia 的头像

    @yehiaabdelm

    Could do it with a flatlist with pagingEnabled

    9 个赞

  • Ant Setiadi 的头像

    @hi_antz

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

    8 个赞

  • MT⚡️ 的头像

    @tmknsm

    09:41 🧐

    8 个赞

  • Mick 的头像

    @mickdewald

    Beautiful! Is there a chance to open source this?

    7 个赞

  • Conor 的头像

    @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 个赞

  • Constantin 🔥 的头像

    @constantout

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

    2 个赞

  • Ryan O'Hara 的头像

    @ryanohara_

    Damn that’s smooth! Nice work

    2 个赞

  • Kyle 的头像

    @kylekane

    Looks great

    2 个赞

  • Billel Boudchicha 的头像

    @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 个赞

  • Ivan Ry 的头像

    @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 个赞

  • pedro 的头像

    @adhambadr2

    code plzzz ?

    2 个赞

  • Shreya Mishra 的头像

    @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 个赞

  • JGF 的头像

    @comvicts

    clean

    2 个赞

  • Abhijeet Sharan 的头像

    @abhijeetsharan_

    Looks smooth

    1 个赞

  • Mayor 的头像

    @notevenclose99

    Love it

    1 个赞

  • ª 的头像

    @alecinodag

    @datboychapo

    1 个赞

  • Davide Espertini 的头像

    @despertini

    wow! really impressive work!

    1 个赞