preactjs / preact-www

:book: Preact documentation website.
https://preactjs.com
MIT License
358 stars 500 forks source link

refactor: Better utilize suspense in Tutorial #1155

Closed rschristian closed 3 months ago

rschristian commented 3 months ago

This should be the last of the vite & preact-iso migration changes, sorry it took so long for me to land.

Better utilizes suspense, so now we can just rely on the router loading state -- no longer is there any loading of the REPL/Code Editor separately post-mount. This also fixes the full unmount of the route when navigating between tutorial steps, structure is now preserved & content is simply swapped out. Feels a lot smoother.

Certainly let me know if any issues are spotted -- I spent a fair bit of time going through different situations manually but this is the most complex page we have by a fair margin, which is why it was left for last.