[Eng Sub]Is it Okay to Pursue Functional Programming on Frontend?
summary
Claim: functional programming is practical on the frontend when focused on concrete abstractions and tooling. The team uses fp-ts and implements Option/Either/Task, pipe, and match/chain to turn eight-form inputs and their 16 states into composable validators. They ship a production custom hook called useStateWithValidator and a StateValidator object that centralizes onChange and manual submit checks, cutting per-field boilerplate. Tradeoffs: clearer types and predictable error paths versus steep onboarding and sparse, sometimes deprecated documentation.
AI-written summary · about
chapters (11)
- 0:00Functional programming intro
- 1:38Pure functions vs side effects
- 3:05Choosing fp-ts
- 3:25Option and Either types
- 7:49Task and TaskEither for async
- 9:15Simplifying with pipe
- 10:21Map chain and match explained
- 13:57Form validation with fp-ts
- 25:26Custom hook for state
- 30:43Upsides and downsides of the approach
- 33:19Conclusion and Q&A
related talks
43mHow to get away with functional programming in frontend applications
47mFunctional programming in JavaScript
28mHow to use Functional Programming in your React app
46mFunctional Frontend. Practical survival guide for backend engineers.
41mFunctional programming: Give it a chance!
47mFunctional Programming on the Web
01h 01mDesign Principles for Better FrontEnd Code
38mThe challenges and benefits of a functional reactive frontend
