Hi,
I am confused why I am getting this error. Appreciate for any help.
Here is the reproducible code for the error.
Frontend vuejs
import { router } from '@inertiajs/vue3'
function test() {
router.post('/story-output', {
'title': "story title",
'story': "This is the story body",
},
)
}
Web.php
Route::post('/story-output', [StoryController::class, 'StoryOutput']);
Controller
public function StoryOutput(Request $request)
{
$storyData = $request->all(); // Accessing the passed storyData
return Inertia::render('StoryOutput', [
'storyData' => $storyData,
]);
}
Error:
router.ts:452 Uncaught (in promise) TypeError: this.resolveComponent is not a function
at C.setPage (router.ts:452:33)
at router.ts:390:21