Import this in your client-side component
MyComponent.tsx
import { useFieldsPopulated } from "react-amazing-hooks";
API
Api | Description | Type | Return Type | Example |
---|---|---|---|---|
useFieldsPopulated | Custom hook that checks if all fields in an object are populated and contain non-empty values | fields: FieldsState | boolean | const fieldsPopulated = useFieldsPopulated(fields); |
Check the FieldsState
in the 'Types' tab.