useful-state
v1.2.4
Published
Downloads
10
Readme
| Methods | Description |
| ------- | ---------------------------------------- |
| open
| Assign truthy value to isOpen
property |
| close
| Assign falsy value to isOpen
property |
| Methods | Description |
| -------- | ---------------------------- |
| open
| Assign truthy value to state |
| close
| Assign falsy value to state |
| toggle
| Inverts current state value |
| Methods | Description |
| ---------- | ---------------------------------------------------------- |
| onFocus
| Call the .focus() method on ref if it exists |
| onClear
| Clear state |
| onChange
| Assign target value to state (provide an event
argument) |