Inertia

How to work effectively with Inertia, always use when developing frontend features

markhamsquareventures dabff3d 1.0 KB Updated

File contents

Inertia

Instructions

Inertia + React

  • Use router.visit() or <Link> for navigation instead of traditional links.

import { Link } from '@inertiajs/react'

Inertia + React Forms

import { Form } from '@inertiajs/react'

export default () => (

    {errors.name && <div>{errors.name}</div>}

    <button type="submit" disabled={processing}>
        {processing ? 'Creating...' : 'Create User'}
    </button>

    {wasSuccessful && <div>User created successfully!</div>}
    </>
)}
</Form>

)

markhamsquareventures/essentials/tree/main/skills/inertia commit dabff3d3d9

Frequently asked questions

npx skillmds@latest add markhamsquareventures/inertia