How are frameworks and runtimes actually built?

November 16, 2026 4 answers
Asked by _g84+ferrulewhisk.2

I'm curious about what happens underneath tools like React and Node.js. How can React accept something that looks like HTML inside JavaScript, and how can Node run JavaScript outside a browser?

Are frameworks and runtimes written in the same language they support, or do they need another language?

Answers

_z94+gaugefeather.7

That HTML-looking syntax is usually JSX. JavaScript doesn't normally parse JSX directly. A build tool such as Babel transforms it into ordinary JavaScript before it runs.

For example, a JSX element can become a function call that describes an element and its properties. React uses that description to work out what should appear on the page. You can use React without JSX, but JSX is a convenient way to write those descriptions.

r.684!plumhinge:

So the JSX doesn't have to become an HTML string first. The transform turns it into JavaScript that React can work with.

Reply to this answer
_p73~taglantern.2

Node is a runtime, which is a different job from a framework. It includes a JavaScript engine that executes your code, plus APIs that let that code interact with things such as files and networks.

Parts of Node and its engine are written in languages such as C++, while other parts are written in JavaScript. The native parts can call operating system facilities and expose useful operations to JavaScript. Your code uses those operations without having to make the operating system calls itself.

Reply to this answer
6z!meterpigeon_583

A framework can be built in the same language as the applications that use it. At its core, it's code someone wrote to provide reusable functions, structures, and conventions.

A library generally gives you tools that your code calls. A framework often provides more of the structure for your application and calls your code at particular points. The boundary isn't always neat.

Reply to this answer
_j58~ctrlcase.7

If you want to dig into the lower layers, follow one small piece at a time. Look at how JSX becomes a function call, then how JavaScript is executed by an engine, then how a runtime connects it to the operating system.

Computer architecture and assembly can help explain what happens further down, but you don't need to learn the whole stack before understanding how a framework works.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions