declarative programming
A style of programming where you describe the result you want and let the system work out the steps, rather than giving each step yourself.
In more detail
SQL queries, HTML and configuration files are declarative. The system chooses the steps, which leaves less room for ordering mistakes.
Example
In React you write what the UI should look like for the current state, and React decides which DOM operations to perform.Related terms
- imperative programming — A style of programming where you give explicit step-by-step commands, such as find this element and set its text.
- React — A JavaScript library for building user interfaces out of components, functions that return a description of what to show.
Taught in
- Suspense Architecture: Promises, Fallbacks, And Co-ordination — React 19 & Modern Component Architecture
- Error Boundaries: componentDidCatch And Fallback UI Trees — React 19 & Modern Component Architecture