Evan Bacon 🥓 Profile picture
Apr 29 12 tweets 7 min read Twitter logo Read on Twitter
🚀 With the new File-based @expo Router, you can create some powerful app layouts––for mobile & web––in a couple lines of code!

I put together an example repo with a bunch of my favorites... and open sourced a brand new layout!

🧵 Check them out in the thread ↓ Image
Replicate Twitter and Instagram profiles with this Collapsing Top Tab Bar layout (NEW).

Uses the Layout Route to render a shared profile, and child routes for the different pages. Just render children with scroll views, and the layout handles the rest ↓
github.com/EvanBacon/expo…
Bottom sheets are great for user-reachability––especially on larger devices!

Layout Routes in @expo can render the initial route as the main screen and a child route as the drawer.

Uses @gorhom's bottom sheet & adds automatic deep linking support!

github.com/EvanBacon/expo…
The default <Stack /> Layout is incredible! Powered by React Native Screens from @swmansion, you can render the native iOS stack with built-in search functionality, in just a few lines of code... Feels smooth as butter! 🧈

github.com/EvanBacon/expo…
Expo Router is so powerful for universal web⇄native because you can easily swap out native navigators for lightweight, custom layouts, per-platform.

Here's a basic web-styled layout that I created entirely custom github.com/EvanBacon/expo…
And here's how it looks on web. Just a couple of anchors in a div, and you're moving between pages––go as light as you want, wherever you want! 🪶 Image
Material top tabs without a collapsing header is another great layout solution! Combining gestures with linking works out of the box in @expo Router.

github.com/EvanBacon/expo…
Tabs are not limited to the top of the screen either...

Here is another beautifully animated Material tab bar that works on iOS, Android, and web! Props to @satya164 for his great work on this component.

Here's how you use it with Expo Router ↓
github.com/EvanBacon/expo…
And of course, drawer navigation is another great pattern on native. This can easily be achieved using React Navigations drawer navigator ↓

github.com/EvanBacon/expo…
✨ End of thread ✨

I'm excited to see what you'll build! Check out all the example layouts here ↓

github.com/EvanBacon/expo…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Evan Bacon 🥓

Evan Bacon 🥓 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Baconbrix

Sep 27, 2022
Today, Expo is reimagining native routing!

✨ Automatically create (dynamic) routes with files
🚀 Zero boilerplate
🔗 Automatic deep linking
🧩 Nested layouts
🔥 Built on React Navigation for easy adoption.

Try the @expo router beta now!

medium.com/@Baconbrix/7a3…
@expo 1️⃣ Expo projects will be even easier to maintain, scale, refactor, and upgrade now that all of the linking and navigation boilerplate are rolled into the framework / Expo CLI.

No more wrestling with native deep links, they just work™
2️⃣ All unmatched routes (404s) are automatically handled and help the user get back to known routes.

This can be customized at various different segment levels.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(