2022/09/21 Techfeed Experts Night #4
Of course, it depends on the situation. You may (NOT) need SPA
It leads slow page load, waste bandwidth, and also slow TTI.
I wish I could use minimum JS when the time I need it?
Instead of full(page-level), why not perform partial(component-level) hydration?
requestIdleCallback()
IntersectionObserver
mouseenter
touchstart
Various islands architecture oriented frameworks implement these features!
<!-- Server rendered HTML here --> <script> $("#js-carousel").carousel({ speed: 500 }); $("#js-popup").popup(); $("#js-video-player").player("https://..."); </script> </body>
At that time, it took a lot of effort to cope with.
But now in 2022, sophisticated frameworks do it better with nice DX.
Maybe more to come!
--- import Layout from "../components/layout.astro"; // ... import VideoPlayer from "../components/video-player.jsx"; --- <Layout> <Header /> <Carousel speed={500} client:load /> <Details> <Popup client:idle /> </Details> <!-- ... --> <Media> <VideoPlayer src="https://..." client:visible /> </Media> <Footer /> </Layout>
Looks familiar to you?
Rebuilt my (next.js) blog using @astrodotbuild out of curiosity...holy shit the difference in bundle size. Home route: 138kb -> 7.6kb "All posts": 570kb -> 100kb (85kb was images) Seriously considering moving my static sites to this
Rebuilt my (next.js) blog using @astrodotbuild out of curiosity...holy shit the difference in bundle size.
Home route: 138kb -> 7.6kb "All posts": 570kb -> 100kb (85kb was images)
Seriously considering moving my static sites to this
https://twitter.com/t3dotgg/status/1437195415439360003
You should definitely try! https://qwik.builder.io/examples/introduction/hello-world/