v4.0.0-beta.3
Pre-release
Pre-release
4.0.0-beta.3 β unreleased
Added
formular/testingsubpath export with acreateTestForm<T>(options)
helper. Returns{ form, Provider }β aForminstance you can read
and mutate directly from test code, plus a minimal React wrapper that
puts that form on context for rendered components. Renderer-agnostic
(works with@testing-library/react, Enzyme, barereact-dom, etc.).FormContextProvidernow accepts an optionalformprop. When
provided, the Provider puts the caller-controlled instance on context
and skips its internal lifecycle (nosetOptions/setInitialValues
re-seed/destroy-on-unmount). Additive β existing usage is unchanged.
Primarily for tests and advanced users who want to own the form's
lifetime.
Bundle
| Bundle | Limit (brotli) | Actual |
|---|---|---|
| ESM entry | 6.5 kB | 5.99 kB (+30 B for the provider split) |
| CJS entry | 7 kB | 6.25 kB |
| Tree-shaken core | 5 kB | 4.35 kB |
| Devtools subpath | 5 kB | 3.12 kB |
| Testing subpath | 5 kB | 4.21 kB (new) |