- Update dependencies for security.
- Update core library.
- Bug fix: add indexer to ValidationError props type. This will allow any additional props to pass-through without TypeScript having an issue with it.
- Migrate to TypeScript
- Add
StaticKitProvideranduseStaticKithook for consuming context - Breaking change: New argument structure for the
useFormhook:
const [state, handleSubmit] = useForm(formKey, opts);- Update core to fix body serialization bug.
- Pass along
clientNamewith form submission.
- Bug fix: an undeclared variable was referenced when
datavalues were functions.
- Accept
dataproperty for adding programmatic fields to the form payload.
- Accept
site+formcombo (in lieu ofid) for identifying forms.
- Bundle iife for testing in browser.
- Refactor npm packaging and add tests.
- Use
useRefinternally to store the StaticKit client.
- Bug fix with form component teardown.
- Update StaticKit Core to prevent messing with
windowobject.
- Update StaticKit Core.
- Teardown the client when form components are unmounted.
Use the @statickit/core client library.
Also, rework the useForm arg structure to accomodate more options:
- const [state, submit] = useForm('XXXXXXXX')
+ const [state, submit] = useForm({ id: 'XXXXXXXX' })We've retained backward-compatibility.
Renamed the UMD global export from statickit-react to StaticKitReact.
Wrap state variables up in a state object in the return value for useForm:
const [state, submit] = useForm('xyz');Initial release.