One great aspect of Turbo frames is lazy loading. You can use this behavior to quickly load in the shell of a UI, and then lazy load all the data. Adding an animating loading status will help give the feeling of immediacy and “a lot of work is happening in the background” without the frustration that the page is stuck. We don’t even need any extra Javascript, since we can animate the page with CSS.
Find the full tutorial writeup: onrails.blog/2...
Please support my work by buying Stimulus Pearls, an eBook on how to use Stimulus in Ruby on Rails: onrails.blog/p...
16 сен 2024