4 ms·
A few years ago, I had this bright idea of updating a site I maintained to be a single page application (SPA). I was very inspired by this site (https://pocketj
by rajangdavis 6y ago
A few years ago, I had this bright idea of updating a site I maintained to be a single page application (SPA). I was very inspired by this site (https://pocketjavascript.com/blog/2015/11/23/introducing-pokedex-org https://pocketjavascript.com/blog/2015/11/23/introducing-pok...) and thought it would make the user experience a lot better by making the site easier to navigate.
I preloaded data such that a user could navigate via search or clicking through some drill-down menus without having to wait for a full page refresh. The data would hydrate the views so that the transition time between views was almost always fast, even on slow mobile traffic.
One aspect that was very difficult to figure out was incorporating views that would require more data from the server. Once a user drilled down to such a view, the challenge became how to load the view via AJAX without having to make another AJAX call to load more data.
The solution was to return server side rendered HTML instead of JSON...
Looking at the demo, this seems very similar to some of the things I had to do minus 95% of the hacky Angular/PHP code I had to set up.
This is a killer feature to have in Rails and I am looking forward to learn more of the conventions that will surround the implementation.
- arvindamirtaa 6y ago>This is a killer feature to have in Rails Hotwire is backend agnostic.