Is it a good to use libraries in PWA? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is it a good to use libraries in PWA?

I've started learning full stack development in Udemy. But I have a question from a very early time. Does using libraries like React is good for developing a PWA (progressive web app)? React library is >110kb in size (for production usage)! It is so huge when you consider internet speed while designing an PWA. It will take time for the app to load. And a PWA should load very quickly.

18th Jun 2020, 2:46 PM
Roopesh
Roopesh - avatar
2 Answers
+ 1
Short answer: Yes, *as long there are other compelling benefits.* Long one: -> React + React DOM is around 30kB gzip minified. There is Preact too. Chances are your CSS file is bigger. 1) You can use server side rendering. I really like Gatsby. That will hydrate React later but you get static HTML, CSS files. You get benefits of both worlds. 2) You can use Svelte if you don't need Virtual DOM (many other differences too I know). You'll get compiled files without runtime dependencies. On downside it'll increase size (to different extents) to inline components.
19th Jun 2020, 12:30 PM
Roneel
Roneel - avatar
0
Roneel how can I use gzip as script?
19th Jun 2020, 1:53 PM
Roopesh
Roopesh - avatar