Rewriting a Production SPA in Elm
summary
A 5,000-line React SPA gets incrementally ported to Elm over six months, rendering Elm inside React and using ports to pass JSON into the Elm UI while moving validation and decoding into Elm decoders and union types. Deployment happens page-by-page; one library is forked (navigation) to support IE11. Results: far fewer runtime errors, simpler refactoring, reduced "sanity" tests, team learning by copying pages, and an Elm codebase growing past 10,000 lines with clearer domain types.
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:30Questions
- 1:20Outline
- 1:40F
- 2:13IT
- 2:46JavaScript
- 6:14Onboarding
- 7:03Pitch
- 7:44React App
- 8:13Rewriting
- 9:11UI
- 10:28Directory Structure
- 11:22Type Structure
- 13:20Publicfacing apps
- 14:10Teaching the team
- 15:25Functional constructs
- 15:51Navigation
- 16:06API
- 16:29Language
- 16:52Testing
- 17:49Compiler Errors
- 18:42Code Wrapping
- 19:05Functions
- 19:21Avoid underscores
- 19:32What does it take
- 20:07Union types
- 20:33Conclusion
