News for hackers. Stuff that matters.
Re:Etsy Moves from React to Preact by kansface on Saturday February 05, 2022 @01:58PM (#30224509)
I lead a project that did an in place rewrite from angular to react while still shipping new features. We wrote an angular -> react shim so that we could render react leaf nodes. We worked down the angular stack replacing increasingly lower level components. We had a cut over date of no new angular code, then essentially a code freeze for a month or so to do the rest (routing, data store). This project took 4 or maybe 5 months, but the resulting velocity on the other side more than made up for it.
Re:Etsy Moves from React to Preact by rvense on Sunday February 06, 2022 @10:59AM (#30233680)
Interesting to know it can be done. We're probably not at a place where we can consider it, but it would be nice to plan for. Can you tell me more about your Angular -> React shim?
Re:Etsy Moves from React to Preact by kansface on Wednesday February 09, 2022 @03:36PM (#30278131)
For some reason, this code [1] is still accessible on the public internet! This dates back to CoreOS and the Tectonic (CoreOS's k8s distro) Console. The code needed to be rewritten, I had familiarity with React, and after the nth time Angular 2 broke backwards compatibility in an RC, we went for it.

It was a little different than I remembered. We moved all data into Redux and piped it into the various Angular bits. Then, it was a matter of making the angular-> react bridge (using ngreact) introduced in this PR.

1. https://github.com/openshift/console/commit/4cc9c5d79f3fdea1...