Inertia.js - The Modern Monolith


本站和网页 https://inertiajs.com/ 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

Inertia.js - The Modern Monolith
GitHubTwitterDiscordBuild single-page apps, without building an API.Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.UsersController.phpUsers.vueclass UsersController
public function index()
$users = User::active()
->orderByName()
->get(['id', 'name', 'email']);
return Inertia::render('Users', [
'users' => $users
]);
}Sponsors:Our sponsors: GitHubTwitterDiscordIntroductionDemo appSponsorsReleasesCore conceptsWho is it forHow it worksThe protocolInstallationServer-sideClient-sideThe basicsRoutingResponsesPagesTitle & metaLinksManual visitsRedirectsFormsFile uploadsValidationShared dataAdvancedEventsTestingPartial reloadsScroll managementAuthenticationAuthorizationCSRF protectionError handlingAsset versioningProgress indicatorsRemembering stateServer-side renderingJavaScript apps the monolith wayInertia is a new approach to building classic server-driven web apps. We call it the modern monolith.Inertia allows you to create fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs. It does this by leveraging existing server-side frameworks.Inertia has no client-side routing, nor does it require an API. Simply build controllers and page views like you've always done!See the who is it for and how it works pages to learn more.Not a frameworkInertia isn't a framework, nor is it a replacement to your existing server-side or client-side frameworks. Rather, it's designed to work with them. Think of Inertia as glue that connects the two. Inertia does this via adapters. We currently have three official client-side adapters (React, Vue, and Svelte) and two server-side adapters (Laravel and Rails).Join the newsletterIf you're interested in following along with the development of Inertia.js, I share updates about it with my newsletter.—Jonathan Reinink, creator of Inertia.jsJoinOn this pageIntroductionNot a frameworkJoin the newsletterOur partners: