4 ms·
>Doing this in real-time with JavaScript/html/css is nice. Having a Rust compile between each step is a pain. I'm more of a JS-lite builder. Typically I will o
by aww_dang 4y ago
>Doing this in real-time with JavaScript/html/css is nice. Having a Rust compile between each step is a pain.
I'm more of a JS-lite builder. Typically I will only decorate pages with the necessary JS for interactivity. Happier using traditional SSR. Pages load with no spinner or reflow. Sometimes I inline a JSON blob for state.
For the layout tweaks you describe, I typically edit the displayed page in Chrome's developer tools. Once I am satisfied I apply those changes to the template and JS. This feels more ergonomic than refreshing the page.
I imagine the same technique would apply to the unified Rust front-end/back-end experience. Just edit the rendered page in developer tools.
I've never been an early adopter. Let's see how this shapes out for version 1.0 or if another framework overtakes it.
- cowsandmilk 4y agoHot reloading is still a widely loved feature for server side rendering. It is part of what mad PHP widely popular and many other frameworks have auto recompilation and reloading on watching changes. The smoothness of automatic recompilation falls apart the longer it takes to compile and rust is not known for fast compiles.
- satvikpendem 4y agoThis works for smaller informational sites but not for larger web apps. I use SSR as well but through NextJS, so that I can organize my components.
- eviks 4y agoHow is this more ergonomic vs page autorefreshes? While you lose your favorite editor tooling by moving to the browser (and then you also have to copy&paste back)
- aww_dang 4y agoFor layout issues, the CSS inspector helps. No need to refresh. For everything else, I just use the editor.