Skip to content

Commit

Permalink
docs: adds missing docs for initial state and adds roadmap section
Browse files Browse the repository at this point in the history
  • Loading branch information
fenilli committed Oct 31, 2023
1 parent 5aa8dc4 commit 04290b8
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ This project aims to seamlessly integrate Inertia.js with FormKit forms, leverag
2. [States](#states)
3. [Event Functions](#event-functions)
3. [Event System](#event-system)
4. [Types](#types)
4. [Roadmap](#roadmap)
5. [Types](#types)

## Quick Start

Expand Down Expand Up @@ -60,6 +61,14 @@ And that is it, now you're ready to look more into the available features of thi

To make integration between FormKit and Inertia easier we include a form helper composable designed to reduce the boilerplate needed for handling form submissions, it by default creates the event system, add method calls and reactive states, and it will also add default behaviours to FormKit forms like loading, disabling and setting errors that come from your backend.

The `useForm()` accepts a single optional parameter that is the initial fields of your form:

```ts
const form = useForm({
email: '[email protected]',
})
```

> Remember that for everything to work as expected you should add the returned plugin to FormKit: `:plugins="[form.plugin]"`.
### Method Calls
Expand Down Expand Up @@ -284,6 +293,13 @@ router.post('/login', options)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## Roadmap

- [] Make the `success` and `error` events to be able to return a `Promise<void>` to delay the call to the `finish` event
- [] Add support for [Laravel Precognition](https://laravel.com/docs/10.x/precognition)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

## Types

<details>
Expand Down

0 comments on commit 04290b8

Please sign in to comment.