Hellocode's avatar

How to use InertiaJs make multi tag pages?

Hello everyone, how to use inertiajs to creative multi tags page, and each page refresh will not affect other pages.

0 likes
6 replies
Randy_Johnson's avatar

You are on the right path because if you're using laravel you will need a js frontend to get what you desire. You have the choice of vue or react, I personally prefer react.

Now you just have to create a front design using css, or css framework tailwind, you can check online for an already built one then inside the frontend component you have to program the functionality so when a button is clicked you will page will update with the data.

''' // Frontend getData() { router.get('/products', data) setData(data) }

Button onClick={() => getData()} ''' ''' // Backend $data = Product::all(); Return Inertia::render('Page', ['data's => $data]); '''

Hellocode's avatar

@Randy_Johnson He implemented it here using keepAlive, vue-router and Pinia, but I don’t know how to use keepAliver in InertiaJS and there is no need to use vue-router because after using vue-router it's not diffrent with restfull api.

Please or to participate in this conversation.