Пропустить навигацию
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,5 тыс. подписчиков

Открыть в 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 отметка «Нравится»