usePlaceholder()
Home > @gooddata/sdk-ui > usePlaceholder
usePlaceholder() function
React hook to obtain/set placeholder value.
Signature:
export declare function usePlaceholder<T extends IPlaceholder<any>>(placeholder?: T): [
PlaceholderValue<T> | undefined,
(valueOrUpdateCallback: ValueOrUpdateCallback<PlaceholderValue<T> | undefined>) => void
];
Parameters
Parameter | Type | Description |
---|---|---|
placeholder | T | (Optional) |
Returns:
[ PlaceholderValue<T> | undefined, (valueOrUpdateCallback: ValueOrUpdateCallback<PlaceholderValue<T> | undefined>) => void ]
Remarks
See IPlaceholder.
Note: When placeholder is not provided, setting its value will result in the error.