@js-from-routes/inertia
TypeScript icon, indicating that this package has built-in type declarations

1.10.2 • Public • Published

@js-from-routes/inertia

Define path helpers to make API requests or interpolate URLs


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.

Readme

Keywords

none

Package Sidebar

Install

npm i @js-from-routes/inertia

Weekly Downloads

53

Version

1.10.2

License

MIT

Unpacked Size

11.4 kB

Total Files

6

Last publish

Collaborators

  • elmassimo