Menu

Post image 1
Post image 2
1 / 2
0

Runtime Is Not the Problem

DEV Community·Viktor Lázár·23 days ago
#oHkgoXe3
Reading 0:00
15s threshold

The most popular story about modern UI frameworks is wonderfully clean. Svelte is small because it is compiled. React is large because it ships a runtime. One moves work to build time; the other carries a machine into the browser. If the question is why a small Svelte app often starts smaller than a small React app, that story is not wrong. It is only too small. The important distinction is not compiled vs runtime. The important distinction is specialized output vs packaged capability . A compiler can specialize the program because it sees the component. A runtime can be small if it is packaged as a set of capabilities the application actually uses. The waste appears when a runtime is distributed as a single old monolith: one root API makes the app pay for the whole engine, including paths that only matter to applications much more complex than the one being shipped. That is not the inevitable cost of React's model. It is the cost of React's packaging shape.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More