Overview
This release comes with support for React 19 and React Router 7. There's also one additional, rarely-breaking change
Changes
React 19 & React Router 7
@rvf/remix
has been renamed to@rvf/react-router
and supports React-Router v7- React 19 is now supported
- React 17 has been removed from peer deps of all packages
Change to the behavior of resetField
This changes only affects cases whereresetField
is used with a second argument to modify the default value (e.g. form.resetField("foo", "newDefaultValue")
. In these cases, the previous behavior of resetField
was unclear and incidental rather than intentional. The new behavior is described in detail in the docs. The main points are:
resetForm()
will now revert any field reset viaresetField("foo", "bar")
resetField("foo")
will now revert nested field resetsresetField("foo.bar", "baz")
- Likewise, if you call
resetField("foo.bar", "baz")
,defaultValue("foo")
will still return the default value of the whole object, ignoring the modified default tofoo.bar
.defaultValue("foo.bar")
will return the new default value.
This change facilitates proper encapsulation when making your own abstractions. In the future, it's might make sense to add a new API to get whatever the "current" defaults are.