-
Notifications
You must be signed in to change notification settings - Fork 12
Design an approach to isometric component support #16
Comments
How is progress on this? What are your main thoughts? |
Some progress! https://github.com/pimterry/leaflet-map-server-component is a fun isomorphic example, rendering on both sides. It does that by extending server-components just there though, as a testing ground. I'm looking at porting various bits of this back into the core library in time, but not yet. Notable points:
The resulting component code looks like this: https://github.com/pimterry/leaflet-map-server-component/blob/master/src/leaflet-map.js. It's mostly pretty good: there's a couple of lines that differ server vs client (search for .onServer), but otherwise the core logic all works nicely. Hope that's useful! I'm still playing with these ideas and steadily iterating, and I'll be updating this to bring them to life a little more later on. Any feedback on what works for you though (or what doesn't) would be super helpful. |
Ahh, so you're running the full library server-side, pre-rendering what would have happened on an initial page load, and then sending that and everything else to the client. Very interesting; I had a similar idea, but this is one step further and a better fulfillment of what I had in mind :) Do you have a vision for dependency + asset management? I can see server-components replacing tools like browserify/webpack since it could inspect the resulting HTML and potentially calculate the dependencies of all custom elements on the page. |
On the other hand, in light of HTTP/2 push, maybe you don't have to worry about script bundling after all, and instead put scripts closest to their component tags? Edit: https://blog.cloudflare.com/accelerating-node-js-applications-with-http-2-server-push/ |
No description provided.
The text was updated successfully, but these errors were encountered: