What is Turbo?
mainTurbo is a framework that provides the speed of a single-page application (SPA) without requiring extensive custom JavaScript. It works by:
- Turbo Drive: Accelerating links and form submissions by intercepting them and using
fetchto replace the<body>and merge the<head>. - Turbo Frames: Allowing you to treat parts of a page as independent components that can be updated or lazy-loaded without affecting the rest of the page.
- Turbo Streams: Enabling partial, asynchronous page updates via WebSockets (Action Cable) using simple HTML container tags.
It is designed to work seamlessly with Rails, allowing you to deliver updates via model callbacks and respond to controller actions with native navigation or standard redirects.