this post was submitted on 07 Jul 2023
1538 points (96.7% liked)
Technology
59201 readers
2736 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's not like electron or something. Sure metro works similarly to webpack, but it's not the same basic web technologies as wefwef. RN runs on threads on your device, a main thread, js thread and shadow thread. The js thread talks to the main thread through a bridge. React Native allows us to work and interface with native APIs with the device, while PWAs does not do that. PWAs don't do that on your phone, it's just like running on Safari really. While the code itself isn't "native" we end up with native components through the bridge. (If all of RN was just a webview then it would be more like how you're describing.)
The way RN works is fundamentally different than React, despite the syntax looking similar and RN being written in JS. It's not like its just React bundled up into a mobile app. I often wish they hadn't named it React Native for this reason, and for having to look up stuff and just getting React answers all the time lol. I am one of the Memmy devs and I am a React developer professionally. FYI this is not in any way a diss at wefwef for not being native, its super super impressive what they've done, I'm sure I could learn a lot about React from their code. Also sorry about the disjointed thoughts, I'm sure I repeated some stuff here or there lol. Hope this clarified a bit how RN works though.
Thanks for the great and detailed reply! Tbh I really thought React Native was just using the webview… super embarassing for a dev of 12 years.
Glad it was helpful!