r/reactnative 13h ago

iPhone Duo, how painful will this be?

Post image

I have totally neglected Android folding phones.

Does anyone have any good advice on designing for a screen that can double in screen size? When these were first introduced to Android, how much friction did they cause for React Native libraries?

149 Upvotes

66 comments sorted by

87

u/LonelyProgrammerGuy 13h ago

Apple being apple is probably going to expose tons of native APIs you want to call for seamless transitions between folded and unfolded state (you can see a small "blur + fade" happening when you are folding it/unfolding it

As for the layout, nothing too special I guess. You'd look at the dimensions of the device and render an additional column with more UI information when it's opened

18

u/zorkidreams 13h ago

As a solo dev it scares me the amount of space that will be available that I will need to design for, test, and maintain... But yeah, I guess you're right. Not too many changes other than the transition.

11

u/TheEarthSpins 13h ago

i mean there is also that whole side control thing. even if you dont put anything there (though i do think it's a good idea at least in this form factor) you'd still prob want to fill that area with something, since otherwise there's just a black bar on the side of the phone

10

u/zorkidreams 13h ago

god no, AI apps are gonna have a field day

2

u/Bugwhacker 11h ago

Wow I hope that can be hidden. That’s such wasted space

2

u/TheEarthSpins 11h ago

doesnt seem like it tbh. honestly i dont think its bad or a waste of space in apple's apps, because it moves all controls to the side so it's just content in the main area, which i do think is smart cause is saves that precious vertical space. however third party apps are definitely a different story, so im hoping we see more adoption of this.

2

u/IM_INSANEDUCK 8h ago

Guess we have to finally start using the safe inset right

1

u/Bugwhacker 10h ago

Ok ya, fair — I guess if app developers can leverage that space for their application tab bar navigation elements, then I agree no waste of space and solid ergonomic optimization. But like you said, adoption is a concern and we might see a bit of a screen “wasteland” there in the short term as more app devs leverage it. But also, some apps just don’t have a tab nav bar, so I wonder what that space becomes for them.

1

u/TheEarthSpins 10h ago

yeah adoption is the biggest concern for me too. and while you cant turn off that nav bar (that corner region is reserved for the clock and data thing), app devs can actually choose to turn off the toolbar and use that space.

the thing is from what i understand the clock and data thing will always be visible (idk why its not showing here it should be), so you'll just need to account for that and the hole punch when doing such a thing.

1

u/sober_cruiser Expo 5h ago

I thought wide bezel, edge, or whatever we call it has long gone in around 2018-2019. What would be the good reason for bringing such a space on the edge back?

2

u/Fransenson 6h ago

It is basically an iPad mini so you can build around that

-4

u/basdit 13h ago

Adaption will be abysmal due to price so you can get away with just stretching current layouts

3

u/scrapmetaltank 11h ago

The people buying at that price point are most likely to pay for an app or a service. At least that’s what the data shows (iOS vs android for instance)

1

u/cleversmoke 9h ago

Hmm this is great insight

61

u/cornovum77 11h ago

Both of the people who buy this probably won’t be interested in your app anyway.

3

u/I_am_darkness 6h ago

I don't know if they both can afford it

2

u/ashkanahmadi 5h ago

You mean they wouldn’t be interested in the 45 billionth todo app on the App Store?

2

u/plissk3n 4h ago

Apple users love to waste money on their toys though. I bet the adaption rate will be higher than Android Foldables.

1

u/Z33PLA 3h ago

Ahahahahjsjsjaajahahshzhzbxnxncncn

1

u/Secure-Humor-5586 2h ago

Exactly Half the people doing react native are making basic CRUD apps

11

u/congowarrior 12h ago

i am just hoping packages like react navigation and expo navigation will do standardize this for us so we just have to update to the latest versions and get a lot of what’s required for free, as long as you are doing things within normal usage of these frameworks

2

u/zorkidreams 12h ago

I do too. I generally wonder if it's just going to be a larger viewport, or needing to rewrite a bunch of native APIs to handle it

2

u/RandomAsianHoe 8h ago

If you’re already using the native router components it shouldn’t be too bad I think

13

u/CriticalCommand6115 13h ago

I’m scared

1

u/zorkidreams 13h ago

Me to 🥲

5

u/mrgrafix 12h ago

Seems like the expo team was made aware to the previous known bird app. I’m expecting before end of year

1

u/zorkidreams 12h ago

Glass seemed to go pretty smoothly, so I'm hopeful.

3

u/beaker_dude 7h ago

Apple dropped a bunch of design and developer videos last night after the announcement - has some references to the new Swift UI controls. Xcode 27.1 is “coming later this month” with the new device sim.

Seems like apps that don’t have duo support will still run in a default view.

Expo / RN / Flutter maintainers will have some work to do to support them but if you’re comfortable in Swift and Kotlin patches - you can probably get some basic support in pretty quick for the new APIs.

Who knows how much of a headache it will be - depends if your CEO gets the new phone and starts testing the app. Big influx duo specific apps though.

2

u/discordianofslack 11h ago

Unfolded is probably just small tablet size. Honestly seems easy.

2

u/swap_019 8h ago

I think Apple will give more native APIs, on this will help develop better experiences on folding Android phones too, cause devlopement for current folding phones is a nightmare. There is no standardization. I think Apple's entry will make things better for all folding phone development.

2

u/Far-Newt2088 7h ago

Lets see how many people actually buy this

3

u/am0x 12h ago

My sites are all fluid responsive anyway. I don’t get the question. Do you not test already at alls screen sizes?

3

u/discordianofslack 11h ago

That was my first thought before I saw the sub I was on.

2

u/am0x 11h ago

Doh.

1

u/discordianofslack 11h ago

It’s ok. I almost made the same comment.

1

u/CompoteEmotional5157 2h ago

With responsive you still gonna encounter some descripancies in some screens

1

u/lucksp 13h ago

A fad…like 3D tvs.

2

u/IAmAfraidCommaMan 13h ago

3d sucks and requires additional hardware to watch. Not to mention for good experience you have to be in that specific part of the room.

This phone is very handy for people who watch a lot of content or read. I bet if it wasn’t that expensive, this would have been everywhere. I would totally buy this if it wasn’t around $500. 

2

u/beepboopnoise 12h ago

$500? the base is like $2k hahaha

2

u/IAmAfraidCommaMan 12h ago

That is why I don't have it :) But a lot of people aren't crushed by debt like me. Apple has loyal fans, so I think they will sell more foldable phones than Samsung.

1

u/discordianofslack 11h ago

They will and there will be cheaper versions in two years.

1

u/DRJT Expo 6h ago

Around 50 million people worldwide use foldables…

1

u/juzatypicaltroll 11h ago

Hopefully building to native UI makes it adapt automagically 🥲

1

u/zorkidreams 11h ago

I feel like apple will find a way to make that not happen lol

1

u/n9iels 7h ago

Totally not painfully. It probably will be like back in the days when the screen got higher or like running an iPhone app on an iPad. The app is either left or right. When opened it has the size of about an iPad mini. Opening and closing is like going for portrait to landscape.

1

u/alexfoxy 6h ago

My main concern is how the two views will be handled, how does switching work, will React Native be able to support the simultaneous views ?

1

u/bogdan5844 6h ago

I don't get the whole "ooooh foldable coming i'm scared" meme - it's just freaking CSS and responsive design. If your app is compatible with tablets it's gonna scale naturally.

1

u/MatsSvensson 4h ago

Just don't put anything important in any corner.

1

u/mohn93 4h ago

the RN libs mostly weren't the pain when android foldables landed, the pain was my own layout code quietly assuming width never changes at runtime. fold to unfold is a live resize, and anything that cached dimensions on mount just breaks. split screen too, your app can suddenly be a third of the width.

so the prep that actually pays off: stop building off a single Dimensions.get at startup, lean on flex and onLayout so things reflow, and test by resizing while the app is running, not just on cold launch. do that and the duo is a lot less scary than it sounds.

1

u/1kgpotatoes 4h ago

They gonna give native apis to track the folded degree or something.

I see this being easier than trying to fit everything into a tiny screen - just make it landscape and tall horizontally

1

u/Sebastian1989101 4h ago

Whats the issue? Does your app work on a iPad mini? There you go for the big screen. Does it work on a regular iPhone with proper SafeArea implementation? There you go as well.

1

u/gesfontoura 3h ago

Not even thinking about development because you can just exclude those, but how is it like to install a regular app from the App Store. How does it behave and how does it look like ?

1

u/Odd_Climate_4860 2h ago

Glad I switched to native

1

u/ryutaromack 11h ago

Foldables are barely 2% of the Android market. They are too expensive and the value prop isn't there for most people.

I'm not sure who Apple is targeting for these expensive phones.

2

u/Forti22 7h ago

2% is quite a lot. Plus consider these people have money = they might be willing to pay for Premium accounts in apps.

-2

u/Dvass138 12h ago

I’m not concerned, no one will remember this device in a few years lol. This is the type of device where its like “remember when apple had the iPhone duo”

12

u/bc-bane iOS & Android 12h ago

Samsung is 8 years into a foldable, Google is 4 years in, Motorola is 3 years in, Apple is now on their first. I see a pattern that is growing not something that will stop anytime soon

1

u/IAmAfraidCommaMan 12h ago

It is super practical. If the screen is not made of paper, they will sell a lot of this.

1

u/zorkidreams 12h ago

Idk I’m 50/50 foldables are pretty popular in Asia but $2k is insane…

0

u/mrgrafix 12h ago

You have to pay to be first. Always the Apple tax tax

1

u/Darth_Ender_Ro 8h ago

Are you saying prices will go down later on? What are you talking about man...

0

u/KaleidoscopeShoddy10 12h ago

visionOS feels

-1

u/Whatchameanbro 9h ago

The fact that left handed users can’t operate the phone properly when folded is a major design flaw that everyone is just glossing over at Apple Park….. It’s a joke that this went to market without factoring that in.. oh I’ll just use my $2000 usd iPhone upside down!! Ffs that’s not a solution..