Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]upgrade inertia to 1 in templates #64

Merged
merged 9 commits into from
Dec 5, 2023
10 changes: 3 additions & 7 deletions templates/mellow-react/assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import React from 'react'
import { render } from 'react-dom'
import { createInertiaApp } from '@inertiajs/inertia-react'
import { InertiaProgress } from '@inertiajs/progress'
import { createInertiaApp } from '@inertiajs/react'
import { createRoot } from 'react-dom/client'
import '~/css/main.css'

InertiaProgress.init()

createInertiaApp({
resolve: (name) => require(`./pages/${name}`),
setup({ el, App, props }) {
render(<App {...props} />, el)
createRoot(el).render(<App {...props} />)
}
})
2 changes: 1 addition & 1 deletion templates/mellow-react/assets/js/pages/example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@inertiajs/inertia-react'
import { Link } from '@inertiajs/react'
export default function Hello({ quote }) {
return (
<div className="flex h-screen flex-col items-center justify-center space-y-8 text-center text-gray-700">
Expand Down
2 changes: 1 addition & 1 deletion templates/mellow-react/assets/js/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Counter from '@/components/Counter'
import { Link } from '@inertiajs/inertia-react'
import { Link } from '@inertiajs/react'

export default function Index({ name }) {
return (
Expand Down
Loading