React JS vs Preact Benchmarks
Автор: Stephen Blum
Загружено: 2024-06-13
Просмотров: 1748
React, a super popular JavaScript library, is used a lot, even in things like Next.js and video rendering. You can also use React Native to build apps for phones that turn into real native app code. But one of the biggest uses for React is in single-page web apps through React DOM. Here's the catch: React can be slow.
You end up loading a big chunk of JavaScript that can cause delays in both loading pages and navigating through them because of constant re-rendering. Andrew Clark, a core team member, says the plan is to use a compiler to boost performance. Preact.js is an alternative that speeds things up a lot by cutting down the JavaScript load size and improving performance.
Preact can stand in for React with significantly less file size, like around 6 kilobytes compared to React’s 60 kilobytes. This makes your app faster for users. If you switch an existing React app to Preact, you might see some improvement, like a 10% reduction in file size.
It’s worth considering Preact if you’re starting a new project for better performance and smaller file sizes. React is still great for big projects and has a massive ecosystem. Preact is good for simple and fast single-page apps.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: