PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

WAVE + Inertia + React is okay?

Solved
hamburger-fries

Nov 6th, 2024 08:58 AM

Loving Wave!!

Would it be okay down the road to install Inertia and React JS. If yes then I would need .js for Alpine and.jsx for ReactJS?

npm install react react-dom @inertiajs/react @vitejs/plugin-react

Then in app use 2 file formats?

resolve: name => {
    const pages = import.meta.glob('./Pages/**/*.{js,jsx}', { eager: true });
    return pages[`./Pages/${name}.js`] || pages[`./Pages/${name}.jsx`];
}

Then lastly update vite, like this.

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import react from '@vitejs/plugin-react';

export default defineConfig({
    plugins: [
        react(),
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js', 'resources/js/app.jsx'],
            refresh: true,
        }),
    ],
    resolve: {
        alias: {
            '@': '/resources/js',
        },
    },
});
bobbyiliev

Nov 6th, 2024 10:32 AM

Hey!

Thanks for this suggestion!

Is your idea to just have React and Inertia available out of the box with a fresh new Wave install?

- Bobby

Report
1
hamburger-fries

Nov 7th, 2024 08:44 AM

Hi Bobby

I was just making sure that adding React would not create problems with Authentication.

I installed it and have made a wave test plugin with no issues.

hamburger-fries

Nov 7th, 2024 04:27 PM

I would be very happy to see this added!

I would be happy to see it preinstalled in the base of Wave.

My concern is as you guys add more features, how do I keep in tune with the updates? If I make many modifications to the core code base I can not take advantage of the upgrades.

hamburger-fries

Nov 12th, 2024 03:16 AM

Is Discord a better place for discussion? Seems like for rapid development questions maybe chat is better?

bobbyiliev

Nov 12th, 2024 03:36 AM

Best Answer

Hey there!

Great questions, and thanks for bringing this up!

  1. React & Wave Compatibility: It's awesome that you've successfully installed React and created a test plugin without any issues. Now thinking about it, currently, not many Wave users utilize React out of the box, so while we probably won’t include it by default in the core installation, it’s definitely something we can look into for the documentation. I can submit a PR to the docs site to include instructions on how to integrate React and Inertia for those who want to extend their setup. This way, anyone interested can easily add it to their Wave projects.

  2. Staying Updated with Wave: We try to isolate most of our major updates within the wave directory, which means you could potentially swap out that folder to update. However, depending on the changes, you may still need to cherry-pick certain updates, especially if you've customized core files. We usually do our best to keep the upgrade process smooth, and we're always open to feedback on how we can improve it!

And yes, the community forum is a great place for discussions, feel free to post the questions here as it is easier for people to find those discussions compared to Discord where chats get lost easily.

Thanks again for the suggestions!

- Bobby

Report
1