Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion 1.x/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,34 @@ If you're new to Livewire, check out the [screencasts available on the Livewire

### Inertia.js + Vue

The Inertia.js stack provided by Jetstream uses [Vue.js](https://vuejs.org) as its templating language. Building an Inertia application is a lot like building a typical Vue application; however, you will use Laravel's router instead of Vue router. Inertia is a small library that allows you to render single-file Vue components from your Laravel backend by providing the name of the component and the data that should be hydrated into that component's "props".
The Inertia.js stack provided by Jetstream uses [Vue.js](https://vuejs.org) as its templating language. Building an Inertia application is a lot like building a typical Vue application; however, you will use Laravel's router instead of Vue router. Inertia is a small library that allows you to render single-file Vue components from your Laravel backend by providing the name of the component and the data that should be hydrated into that component's "props" like this.

```{js}
Route::middleware(['auth:sanctum', 'verified'])->get('/edit', function () {
return Inertia\Inertia::render('Edit', [
'testing_props' => 'This is prop testing'
]);
})->name('edit');
```
Then in your Vue page (Edit.vue) you can do like this:

```{js}
<template>
<h1>This props {{ testing_props }} is from Laravel routes</h1>
</template>
<script>


export default {
components: {
//your components
},

props: ['testing_props']
};
</script>

```

In other words, this stack gives you the full power of Vue.js without the complexity of client-side routing. You get to use the standard Laravel router that you are used to.

Expand Down