1.10.2 • Published 2 years ago
@js-from-routes/inertia v1.10.2
This package extends @js-from-routes/client to use Inertia.js.
It's useful when using Inertia.js, since it allows request helpers to handle forms as well.
Installation 💿
npm i @js-from-routes/inertia # yarn add @js-from-routes/inertia
Usage 🚀
import { definePathHelper } from '@js-from-routes/inertia'
const get = definePathHelper('get', '/video_clips/:id')
get.path({ id: 5 }) == '/video_clips/5/download'
const video = await get({ id: 5 })
License
This library is available as open source under the terms of the MIT License.