Skip to content

Migration Guide

NOTE

Due to significant upcoming changes planned for the underlying adapters, creating a detailed migration guide at this time wouldn't be very helpful.

We understand this might be inconvenient, but rest assured we'll provide a comprehensive migration guide once the adapters updates are finalized.

Thank you for your patience!

Third Party Support

AdonisJS Inertia Starter kit

Inertia.js-Revamped seamless supports adonisjs.

  • Add luxon to package.json devDependencies, else adonisjs throwing an error.
  • Add PNPM overrides to package.json.
json
"pnpm": {
  "overrides": {
    "@inertiajs/core": "npm:@inertiajs-revamped/core@^0.0.5",
    "@inertiajs/react": "npm:@inertiajs-revamped/react@^0.0.7"
  }
}
  • Follow the Package Imports guide below, but instead of replacing the module name, you still need to import from '@inertiajs/react'.
tsx
import { createInertiaApp, resolvePageComponent } from '@inertiajs/react'
import { createProgress } from '@inertiajs/react/progress'

Ziggy

Inertia.js-Revamped seamless supports Ziggy.

Package Imports

app.tsx -> main.tsx

typescript
import { createInertiaApp } from '@inertiajs/react'
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
import { createInertiaApp, resolvePageComponent } from '@inertiajs-revamped/react'
import { createProgress } from '@inertiajs-revamped/react/progress'

progress: { 
  color: '#4B5563', 
} 
progress: () =>
  createProgress({ 
    color: '#4B5563', 
  }) 

ssr.tsx <-> ssr.tsx

typescript
import { createInertiaApp } from '@inertiajs/react'
import createServer from '@inertiajs/react/server'
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
import { createInertiaApp, resolvePageComponent } from '@inertiajs-revamped/react'
import { createServer } from '@inertiajs-revamped/react/server'
typescript
import { usePage } from '@inertiajs/react'
import { usePage } from '@inertiajs-revamped/react'
typescript
import { useForm } from '@inertiajs/prereactact'
import { useForm } from '@inertiajs-revamped/react'
typescript
import { useRemember } from '@inertiajs/react'
import { useRemember } from '@inertiajs-revamped/react'
typescript
import { Head } from '@inertiajs/react'
import { Head } from '@inertiajs-revamped/react'
typescript
import { Link } from '@inertiajs/react'
import { Link } from '@inertiajs-revamped/react'

Changelog - @inertiajs-revamped/react

0.0.7 (2024-06-27)

Features

Builds

  • update dependency @types/node to ^20.14.9 (ec36814)
  • update dependency @types/node to ^20.14.8 (aff9dc4)
  • update dependency @types/node to ^20.14.6 (f4da004)
  • update dependency @types/node to ^20.14.2 (bdc0617)

0.0.6 (2024-06-03)

Builds

  • update dependency @types/node to ^20.14.0 (2340303)
  • update dependency @types/react to ^18.3.3 (b344758)

0.0.5 (2024-05-19)

Features

  • exclude properties from partial responses, based on (inertia PR 1876) (69bbd5d)

Builds

  • update dependency @types/node to ^20.12.12 (e3c265f)

0.0.4 (2024-05-15)

Features

  • allow set processing to be set on react adaptors (fe8e2c7)

Code Refactoring

  • replace lodash.isequal with fast-equals (6717177)

0.0.3 (2024-05-11)

Code Refactoring

  • replace default with named exports (fa860ed)

Bug Fixes

  • fix Link.onClick event not fired (29d158d)

Builds

  • update dependency @types/react to ^18.3.2 (05c4a66)
  • update dependency @types/node to ^20.12.11 (96686b8)
  • update dependency react to >=18.3.1 (be55995)

0.0.2 (2024-05-02)

Code Refactoring

  • replace default with named export in progress.ts (04ef2bc)
  • replace default with named export in server.ts (dbe7eac)

Bug Fixes

Builds

  • update dependency @types/node to ^20.12.8 (2d1a120)

0.0.1 (2024-04-26)

Features

Code Refactoring

  • export createProgress from adapters, excludes progress from bundle by default (d224363)
  • export default as createServer to avoid forcing allowSyntheticDefaultImports flag (7f6544c)
  • replace typeof renderToString, removes react-dom from peerDependencies (ad65d99)
  • replace type ReactComponent with ReactNode (1a12eec)
  • replace misleading type ReactInstance with ReactElement (36e9711)
  • move HeadManagerOnUpdate & HeadManagerTitleCallback to core (7c5c6a4)
  • improve withLayout types to work with module augmentation (7bbc21e)
  • improve & export InertiaHeadProps & InertiaHead types (bdb1aab)
  • remove deprecated useRememberedState() (3dcc6d0)

Bug Fixes

  • fix the remaining type errors (22d3cb7)
  • capitalize and make PageContext generic or null, force usePage return type explicit (8d7ffbc)
  • capitalize and make HeadContext generic or null, fixes multiple ts(2769) (c4bd85a)
  • re-export all types from core package (b88ee78)
  • add missing type exports for multiple un-exported types (33a8fa9)
  • check for undefined render in createInertiaApp(), fixes ts(2722) (74016ed)
  • add missing resolveComponent type in createInertiaApp(), fixes ts(7006) (fa98f18)
  • add missing head type in createInertiaApp(), fixes multiple ts(7034) (bb22517)
  • change key initial value to -1 in app.ts, fixes ts(2345) (9756ab1)
  • memoize transform to fix useForm() bug (based on inertia/pull/1718) (8f9d987)
  • add missing generic for useForm() cancelToken, fixes multiple ts(2322) (5861bec)
  • add missing generic for useForm() recentlySuccessfulTimeoutId, fixes multiple ts(2769) (786f413)
  • add missing visit parameter for useForm().onFinish(), fixes ts(2554) (ae22230)
  • add missing generic for useForm() progress, fixes ts(2345) (9463079)
  • add missing types for useForm() submit callback parameters, fixes multiple ts(7006) (dd75747)
  • fix useForm() isMounted initial value to false, fixes ts(2322) (121b2b2)
  • add type annotation to router, omits default-wildcard core import from d.ts bundle (02ce58d)
  • add type annotation to explicitly specify the type of <Link>, omits default-wildcard React import from d.ts bundle (bca76fa)
  • fix onCancelToken type in link.ts (48d190a)
  • add missing type export for BaseInertiaLinkProps (7437f4f)
  • remove line breaks in link.ts warn, fixes minified bundle mess (b0d20f9)
  • use native events in link.ts to ensure compability with instanceof, fixes ts(7006) (3184668)
  • remove useless rename of default export in server.ts (b461fd2)
  • omit default-wildcard React import from d.ts bundle by removing all default React imports (ed7de67)
  • replace default React imports with named imports in link.ts (0899a77)
  • replace default React import with named in head.ts (b46e225)
  • ensure that all imports used only as a type use a type-only import (6ae2d05)