3 ms·
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 rende
by kansface 5y ago
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.
- rvense 5y agoInteresting 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?
- kansface 5y agoFor 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/4cc9c5d79f3fdea13063bb60e1ffc533ab832a44 https://github.com/openshift/console/commit/4cc9c5d79f3fdea1...