inertia-react@v0.5.6

Published on April 2, 2021
  • Disabled automatic remembering of form data and errors in history state (#597).

Disabled automatic remembering of form data

This release updates the form helper to no longer automatically remember form data and errors in history state. While that behaviour was nice, it caused unexpected issues when there are multiple forms on a single page.

The way to avoid these issues was to provide a unique form key. With this change, form data and errors are only remembered when a key is provided.

// Not remembered
const { ... } = useForm(data)

// Remembered
const { ... } = useForm('CreateUser', data)