@randy_johnson So what’s the issue? If the “Hello, world!” isn’t displaying in the browser then open your browser’s developer console and see if there are any JavaScript errors. Otherwise, no one can help with “doesn’t work”.
Dec 27, 2022
4
Level 8
VueJS Inertia Not displaying!
I should mention I also got to the same point and had the same problem with reactJS. https://inertiajs.com/client-side-setup, https://www.youtube.com/watch?v=inBAncC__YI&list=PL3VM-unCzF8jeu0m8pSz6-Q9TwV74AbvW&index=3&ab_channel=Laracasts.
Help, I am going insane.
Something I am not able to do what I keep seeing on the tutorials is most are using mix.
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return inertia('Welcome');
});
import { createApp, h } from 'vue'
import { createInertiaApp } from '@inertiajs/inertia-vue3'
createInertiaApp({
resolve: name => require(`./Pages/${name}`),
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.mount(el)
},
})
<template>
<h1>Hello world!</h1>
</template>
<script>
export default {};
</script>
Level 8
Fixed it
createInertiaApp({
resolve: (name) => import(`./Pages/${name}.vue`),
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.mount(el)
},
})
Thanks to everyone here! Couldn't of done it with out you!
Please or to participate in this conversation.