Migrating to React Native's New Architecture

(shopify.engineering)

41 points | by vidyesh 3 days ago

8 comments

  • yomismoaqui 13 minutes ago
    The only constant in mobile development is churn.

    I had apps on Google Play and every year I had to upgrade libs, recompile and loose and afternoon (or two) to not win anything, just churn for the sake of churn.

    Compare this to plain HTML, CSS & vanilla JS. You can deploy a webapp today and if you are not using any beta JS Chrome API you will be able to use that site in 10 years without touching a line.

  • renegade-otter 33 minutes ago
    The problem with relying on these high-level frameworks, or heavy frameworks of any kind, is that one day they will change their entire approach to how things should be implemented, and then you have a giant pile of legacy on your hands.

    I learned that lesson the hard way with ExtJS 3 => 4, and now my wife claims I have commitment issues.

    • tcoff91 5 minutes ago
      They are close to finally stabilizing the API (as much is possible given underlying platform stability). New Architecture has been in the works for 8 years. It’s such a massive upgrade over legacy architecture. Migrating our app to new architecture was not that hard tbh.
  • afavour 18 minutes ago
    I have a lot of respect for the work the React Native folks do but at the same time the constant reinvention just highlights an inherent weakness in any framework like this: you don’t control the platform, so you’re always always at least one step behind.

    Sometimes that tradeoff is worth the cost but other times (particularly in the era of Swift and SwiftUI having replaced Objective C and UIKit) you’ll be better off just biting the bullet and learning a little native code. As a JS developer I found Swift to be a delight.

  • mellosouls 1 hour ago
    Perhaps it's buried in the article somewhere but I think it should highlight in the introduction what business problems were solved or improved, and what the original architecture was; essentially why this major migration was undertaken.
  • twelvedogs 9 minutes ago
    I tried a little while ago, sticking to raw HTML sucks arse, basic shit that should be built into the language like file upload is fucking painful. If react is too heavy just say react is too heavy
  • mcsniff 1 hour ago
    Still no dark mode, it's almost as embarrassing as HN not having dark mode. Yeah I said it, again.

    https://news.ycombinator.com/item?id=34263628

    In the time it took to write this self-congratulatory post, they could have used the AI they push down everyone's throats to add dark mode to the mobile app.

    • bilekas 1 hour ago
      I don't use Shopify so I don't know the nuances but isn't that your responsibility? Also seems a little off topic to the article ?
      • mcsniff 1 hour ago
        Their mobile app, that a merchant would use to manage their store, has no dark mode.
  • brazukadev 1 hour ago
    A new React native architecture again?! I bet later this year we will have a new React (base) architecture change too
    • tcoff91 2 minutes ago
      There’s literally only one time this has happened in react native and it took 8 years to finish being built and roll out completely.
    • sesm 33 minutes ago
      That's why 'New Architecture' is a bad name. They should have called it 'Bridgless Architecture' or just 'V2 Architecture'.

      I remember how in an old ClearCase codebase we had a comment saying `New! <projectname> 4`. Version 4 was about 20 years old at that point. We kept this comment as a reminder to never use 'new' when naming or describing anything.

    • HelloNurse 1 hour ago
      I think "TurboModules" are from the "current" new architecture (now several years old), not a new one, but I might have skipped some episodes.
    • frou_dh 59 minutes ago
      Maybe it's not so new, like "modernism" in art is 100 years ago.
    • cthulberg 1 hour ago
      why "again"?
  • xutopia 23 minutes ago
    React is a bad idea imo. I see small teams do way better with plain old HTML augmented with minimal Javascript. React itself is huge to download and slower to execute. I can't believe we're still stuck in React world.
    • bnchrch 8 minutes ago
      While you might be right.

      It seems like you didn't notice this was about React Native, the cross platform mobile app framework.

      So "just write plain html" isn't a valid alternative unless you want to write a Progressive Web App instead. Which means you:

      - Forego the App Store and need to ask users to bookmark your website

      - Loose ease of access to device features (cameras, sensors, push notifications)