Mohmaedhasssan's avatar

Mohmaedhasssan liked a comment+100 XP

5mos ago

Build Modern Laravel Apps Using Inertia.js: Ep 8, Active Links

ReactJS implementation will look like this.

import { Link, usePage } from "@inertiajs/inertia-react";
.
.
.
 const { component } = usePage()

<Link href="/" className={component === "Home" && 'is-active'}>
         Home
 </Link>
Mohmaedhasssan's avatar

Mohmaedhasssan liked a comment+100 XP

5mos ago

Build Modern Laravel Apps Using Inertia.js: Ep 5, Progress Indicators

@adamwaheed

I am also using Breeze. Try adding a delay to one of the Nav links in your web.php routes file.

Route::get('/users', function () {
    sleep(2);    // add 2 second delay here
    return Inertia::render('Users');
});
Mohmaedhasssan's avatar

Mohmaedhasssan liked a comment+100 XP

5mos ago

Build Modern Laravel Apps Using Inertia.js: Ep 3, Pages

@Lordbedwetter For anyone else struggling with the documentation for React + Laravel, this episode from React Beyond the Basics covers the steps the documentation skips over (https://laracasts.com/series/react-beyond-the-basics/episodes/13).

For figuring out the React equivalent of the Vue way of doing stuff, I personally find looking at the code for the demo app more intuitive than reading the documentation (https://github.com/Landish/pingcrm-react).