Skip to content

Commit

Permalink
[feat]upgrade inertia to 1 in templates (#64)
Browse files Browse the repository at this point in the history
* fix(mellow-react): update engines to fix warnings

* feat(mellow-react): remove and install latest version of inertia for React

* feat(mellow-react): upgreade Reat and React-dom to v18

* feat(mellow-react): fix code needed to upgrade to Inertia 1.0

* chore(mellow-svelte): upgrade Node engine

* feat(inertia-svelte): remove and add inertia packages for Svelte

* feat(inertia-svelte): upgrade code to Inertia v1.x

* chore(mellow-react): update inertia-sails to latest version

* feat(mellow-svelte): upgrade Svelte
  • Loading branch information
DominusKelvin authored Dec 5, 2023
1 parent 42faf76 commit 0bf6aa4
Show file tree
Hide file tree
Showing 10 changed files with 16,535 additions and 29 deletions.
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

0 comments on commit 0bf6aa4

Please sign in to comment.