From Imperative to Declarative
summary
Compares concrete code patterns: for loop vs reduce to build arrays, shows Set with hash constant lookup used to unique an array (TC39 implementation), demonstrates filter/map producing JSX to render a list of wizard objects with added punctuation, and contrasts jQuery’s direct DOM manipulation with React’s state-driven updates. Notes Big O tradeoffs (linear vs quadratic loops), shows declarative versions are cleaner and usually same runtime but imperative can be faster for tight hotspots.
AI-written summary · about
chapters (6)
related talks
30mDeclarative by default
16mThe Declarative Mindset
11mIntroduction to functional programming
30mJavaScript prerequisites for React (hooks)
30mA Cartoon Guide to Performance in React
31mUnderstanding Rendering Patterns
28mThe State of React State in 2019
28mHow to use Functional Programming in your React app
