Design Patterns · Senior · Question 16 of 75
What does "functional core, imperative shell" mean?
- ✓Correct answer: Logic as pure functions, effects in a thin outer layer
- 2The core is written in Haskell and the shell in JavaScript
- 3Components are functions, while hooks are classes
Explanation
Calculations, validation and state transitions are easy to test without mocks, while requests, timers and the DOM are isolated at the edges. Redux reducers with effects in middleware, or TanStack Query, are examples of this separation.