SuperAPI AI Directory

inertia

Frontend & websites

View repository

Updated 10-16 00:06

About this skill

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>

)