Why I Still Prefer React Over Lightweight Alternatives: Benchmarks and Insights

The article examines why the author favors React for server‑side rendering despite the rise of lightweight libraries like Preact and Inferno, discussing checksum handling, compatibility, maintainability, future roadmap, and presenting benchmark data that shows React@16’s performance gains.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Why I Still Prefer React Over Lightweight Alternatives: Benchmarks and Insights

1. Introduction

React’s popularity has spawned many lightweight alternatives such as Preact and Inferno , which aim to address perceived size and speed issues. Server‑side rendering functions like renderToString and renderToStaticMarkup are synchronous and can be slow, prompting the creation of libraries like preact-render-to-string and fast-react-render. The author, however, remains skeptical of these replacements, especially in isomorphic scenarios.

2. Reasons for Preferring React

Checksum

When React renders on the server, it adds a checksum attribute (in addition to data-reactid) to the root node. The client validates this checksum on the first render, avoiding costly DOM diffing when the markup matches. Alternatives lack this mechanism, forcing a full DOM tree re‑render each time.

Compatibility

Preact and Inferno do not achieve 100% compatibility with React, meaning many React‑specific libraries (e.g., ant‑design ) cannot be used directly.

Premature Optimization

Focusing on the real performance bottlenecks—such as network latency or inefficient code—often yields greater gains than swapping the entire framework.

Maintainability

React is developed and used by Facebook in production, backed by extensive test suites and long‑term stability. Community‑driven alternatives may be abandoned after a few years, raising concerns about timely bug fixes and compatibility with newer React versions.

Future Roadmap

The React team continuously improves the library (e.g., Fiber, streaming rendering). Render functions like renderToString and render have become faster, narrowing the performance gap with lightweight libraries. Streaming support is now merged into the core, a feature still missing from most alternatives.

3. Benchmark

Server‑side rendering tests (1000 ×  and 200 000 ×  renders) show React @16 outperforming React @15 by roughly one‑third and approaching Preact’s numbers. The renderToStaticMarkup method performs competitively and can be a fast SSR option when checksum validation is unnecessary.

Server Benchmark (times in ms)
------------------------------
                fast-react  preact  react  react‑static  react15
1000×               3.00      4.00   7.00        3.25     7.75
200000×           311.00    443.00 557.00      297.50   805.50

Client‑side tests using Chrome Headless indicate React @16’s rendering time more than doubled compared to React @15, with checksum consistency further reducing re‑flow costs. Preact’s smaller bundle size still gives it an advantage on low‑end devices or very slow networks.

4. Conclusion

React @16’s performance improvements make it a solid default choice for most projects. Exceptions include scenarios with extremely poor network conditions (e.g., 2G) where a smaller bundle like Preact may still be beneficial, or new projects where the team prefers not to adopt React at all.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceReactBenchmark
Tencent IMWeb Frontend Team
Written by

Tencent IMWeb Frontend Team

IMWeb Frontend Community gathering frontend development enthusiasts. Follow us for refined live courses by top experts, cutting‑edge technical posts, and to sharpen your frontend skills.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.