Sitemap

Member-only story

Chapter 27: Why Did I Hear About Declarative Programming for the First Time When I Learned React?

3 min readAug 14, 2026

--

Free video for non-members
Watch the video on YouTube

Press enter or click to view image in full size

Layer of software development:

Machine language
Assembly language
Advanced languages — C, C++, Python, JavaScript, etc.

React is not a language. React is a JavaScript library. The team at Meta wrote thousands of lines of JavaScript code and gave it the name useState(). They coded another thousand lines of JavaScript code and called it createRoot(), etc. Those thousands of lines are invisible to users. Developers install libraries from NPM, import them into the files and components where they need them, and use them as declarations.

In package.json, we can see which libraries we have installed. For example:

“dependencies”: {

“react”: “¹⁹.2.6”,

“react-dom”: “¹⁹.2.6”

},

Example of an import in the entry-level main.jsx:

import { createRoot } from ‘react-dom/client’

Example of using it in code:

--

--