Jack talks about the reasons why he's moving a large scale app from Angular to React and the practicalities of doing so in a less risky, flexible manner that hasn’t left him and his team rebuilding from scratch, but implementing incrementally.
Primarily used within iframes — Added Redux to be used alongside Angular — 2 main developers no longer with the company — Very heavy on features — Our main source of revenue — Tickets being sold constantly — Used by our flagship clients (Adele, RHCP and others)
which features are actually needed — Many different use cases — Regular general admission tickets — Reserved seating tickets — Queued tickets for big sales — VIP tickets ("meet and greet") — Merchandise addons (Ticket + album = 10% discount) — We have a lot of stores in the wild
us to work on bugs in existing code whilst migrating others — Allows us to build new features whilst migrating — We can experiment by moving piece by piece and try different approaches — Current stores continue to function correctly — We can move quickly and release small parts at once - avoiding risky big bang releases — Downside: introduce some migration specific code
! Another, newer, product at Songkick was built with React ! React leaves you with less framework specific code ! It's Rafa Benitez's framework of choice
— Most of those lines are tied directly to Angular — Many dependencies outdated due to lack of maintanance over past 6 months — A store that cannot be broken at any point (we sell tickets pretty much continuously)
angular.service('LocalStorage', function() { ... }) But this service is used in ~15 places in the app. And we want to release the migration in tiny chunks.
code without being aware it's changed ! New React components can import the module without any of the Angular boilerplate " We had to write a small amount of migration specific code
— ! They test the entire system, with no faked API calls or fake data — ! This means they are entirely independent of the migration — " They can flake sometimes and are slow to run
or bug fix, it's hard and takes a long time to fix and have confidence that we've not inadvertently broken anything else" "This migration will enable us to have a leaner, stable codebase which we will have more confidence in and be able to build features and fix bugs more quickly" "It will enable us to onboard new developers to the team easily and have them contributing quicker than with the current codebase"
combination of Makefiles, misc command line tools and Browserify. This was hard for us to follow and was very brittle. We moved to Webpack which lead to reduce build times, smaller bundles and got us more inline with the rest of the community.
35% done. Most of the core visual journey is done. All forms that users interact with are now in React. We've had very few bug reports on any of our new React code, compared to the old Angular code.
when we've removed Angular from our codebase. But when that happens we'll keep refactoring & revisiting old code as we fix bugs and introduce new features.