github airjp73/rvf v7
v7 -- React 19 & React Router 7 support

latest releases: zod-form-data-v2.0.4, 7.0.1, v7-adapter-patch...
15 hours ago

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 via resetField("foo", "bar")
  • resetField("foo") will now revert nested field resets resetField("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 to foo.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.

Don't miss a new rvf release

NewReleases is sending notifications on new releases.