Skip to content

Releases: akshay-nm/use-form-state

Breaking Changes: Switch to named exports

11 May 18:57
c5c6848
Compare
Choose a tag to compare
  • Switch to typscript! (the library now has types)
  • Add a hook which exposes state related to a single text input aka useTextInputState
  • Switch to named imports. useFormState is no longer accessible as default import.
  • The library now exports 2 hooks
    • useTextInputState
    • useFormState
      You can import both of them like:
import { useFormState, useTextInputState } from '@akshay-nm/use-form-state'  

Fix states not being updated

01 May 11:11
9c9cc5b
Compare
Choose a tag to compare

No breaking changes, bug fix.

v2.1.1-rc

01 May 11:04
Compare
Choose a tag to compare
v2.1.1-rc Pre-release
Pre-release
Fix states not being updated

Now users can access whether a particular state is valid on not

01 May 06:38
79a3c36
Compare
Choose a tag to compare

The hook does validations asynchronously, so the value of showVariableWarning doesn't necessarily indicate whether a value is valid or not. Sometimes users might be interested in the validity of the value for example in the case of multistep forms.

Before this release you could only access;

  • the value of the state variable
  • whether to show a warning for a state variable

But there was no way to know whether the state variable is valid at a given instant.

This release fixes this issue by exposing an isVariableValid property for each variable configured during hook initialization.

Contributing, security, and code of conduct

20 Apr 06:53
80ce615
Compare
Choose a tag to compare
Merge pull request #2 from akshay-nm/docs

Docs

Potentially breaking changes

20 Apr 06:32
15c6439
Compare
Choose a tag to compare
  • Switched to object export
  • Switch to object type configuration
  • Improve docs
    No need to create a wrapper, you can now directly pass the configuration to useFormState and expect field named stuff.

Add /dist

12 Apr 03:18
Compare
Choose a tag to compare
v1.0.2

Add dist to repo

Update documentation

04 Apr 20:31
61448d3
Compare
Choose a tag to compare
  • Replace the example generated by create-react-library with the actual example.

First Release!

04 Apr 20:18
61256c0
Compare
Choose a tag to compare
  • declare state params as an object and pass it to hook
  • check the example for more details