News for hackers. Stuff that matters.
Re:No, React Native is not the future by ericlewis on Saturday December 31, 2022 @03:35PM (#34200458)
combining RN and RNW is a pain in practice. It can be done, but not easily.
Re:No, React Native is not the future by phist_mcgee on Saturday December 31, 2022 @08:07PM (#34202507)
I've done it. Once you're setup, it really does work quite out of the box. What you do have to be mindful of is clear separation of concerns when designing platform specific components - you have to think in terms of Button.native.ts and Button.web.ts when you're doing things like haptic feedback or animations.

The only thing that's really a pain is that react dev tools has a harder time dealing with RNW components, and debugging in general can be a bit of a pain.

Re:No, React Native is not the future by no_butterscotch on Sunday January 01, 2023 @03:11AM (#34204589)
How are you liking it so far? Perf issues or no?

Any concise/clear resource or guide you used?

Re:No, React Native is not the future by phist_mcgee on Thursday January 12, 2023 @08:02PM (#34362618)
>How are you liking it so far? Perf issues or no?

Perf seems totally within reasonable bounds for a react app, no issues so far.

In terms of resources or guides, it's pretty spotty out there. The project has definitely slowed down in terms of dev and i'm not sure where things like react 18 fit into the picture across platform, but we've setup our own config that works just fine for now.

We may need to reappraise in 2-3 years if react does change architecturally too much.

Re:No, React Native is not the future by ramesh31 on Saturday December 31, 2022 @08:22PM (#34202602)
>combining RN and RNW is a pain in practice. It can be done, but not easily.

It's completely painless with Expo. With the tradeoff being you are locked into the Expo compatible ecosystem. Incredible devX if you go all in on it though.

Re:No, React Native is not the future by no_butterscotch on Sunday January 01, 2023 @03:10AM (#34204587)
What's great about it?

I was considering using RN for a cross platform app and for some reason got the impression (earned or not) that Expo was for beginners, and people who have "non trivial" apps will have to "eject" (as it's called in Expo) sooner or later. So I was going to avoid it.

Re:No, React Native is not the future by supermatt on Sunday January 01, 2023 @04:04AM (#34204831)
not so. you can build complex apps with the expo libs.

The reason people "eject" is primarily to add 3rd party native modules for functionality not available in expokit, or to optimize build size by removing unused expokit functionality. This isnt neccessary in the vast majority of cases as you can use Expo App Services to do this (locally, or remotely if you dont have mobile sdks installed)

And you still get the other benefits of expo - e.g. "batteries included" api, OTA app updates, not having to install the mobile SDKs, etc.

Re:No, React Native is not the future by ericlewis on Sunday January 01, 2023 @10:14AM (#34206891)
It isn't even necessary anymore I believe, as Expo has a way to do so.
Re:No, React Native is not the future by supermatt on Monday January 02, 2023 @04:20AM (#34215987)
There are still some cases where you will need to eject (if you want to embed as a view in an unmanaged app for example).
Re:No, React Native is not the future by no_butterscotch on Sunday January 01, 2023 @07:28PM (#34212760)
ok thanks!

whats the type of functionality not available?

Re:No, React Native is not the future by supermatt on Monday January 02, 2023 @04:27AM (#34216031)
Anything not in the expo sdk ;) https://docs.expo.dev/versions/v47.0.0

You then use 3rd party modules (or build your own) to add/extend native functionality that is exposed to react native. For example, webtrc: https://github.com/react-native-webrtc/react-native-webrtc

Re:No, React Native is not the future by TotempaaltJ on Tuesday January 03, 2023 @10:20AM (#34232464)
This is (effectively) false. You don't need to eject to use third party modules (including, but not limited to, react-native-webrtc). You can use expo-dev-client to build your own "Expo Go"-esque development app, and EAS Build provides a fully transparent build environment.

To be precise, EAS Build does actually eject IIRC, but you never notice this during development. I haven't ejected or seen an android/ or ios/ directory in the past year of developing an Expo app, using many third party libs.

Re:No, React Native is not the future by TotempaaltJ on Sunday January 01, 2023 @07:16AM (#34205724)
The "Expo compatible ecosystem" has been all is the react native ecosystem for quite some time now, from what I can tell
Re:No, React Native is not the future by ericlewis on Sunday January 01, 2023 @10:12AM (#34206866)
I agree with Expo being pretty painless. Anytime people are really set on using RN I tell them, just use Expo. Now a day, you can integrate external libs and such quite easy.
Re:No, React Native is not the future by kbcool on Sunday January 01, 2023 @04:58AM (#34205089)
It's easy for a new app, plug and play!

It gets harder if you want to retrofit it to an older app using older third party libraries that have no or limited support. You have to pick through everything to work out what's playing up.