@self-assert/react API
Components
| Function | Description |
|---|---|
| FormField | Handles the logic for a form field and its error message, given a DraftAssistant. |
| ErrorMessage | Component to display a DraftAssistant's broken rules. |
Hooks
React hooks that act as DraftAssistant wrappers and trigger re-renders.
| Function | Description |
|---|---|
| useDraftAssistantModel | Hook to get and set the model of a DraftAssistant, triggering a re-render whenever the model changes. |
| useBrokenRulesDescriptions | Hook to get the descriptions of the broken rules reported by the DraftAssistant. |
Others
| Type Alias | Description |
|---|---|
| FormFieldProps | - |
| ErrorMessageProps | - |
