Inertia.js ships with a fantastic form helper but it falls short when also using API/Axios calls in your project.
Here's a composable, built on top of the Inertia's form helper that hooks into it to replace the API calls with Axios.
To use, just replace useForm
with useAPIForm
.
const form = useAPIForm({
title: '',
});