usePollTypes()
usePollTypes
usePollTypes
The usePollTypes
hook is a custom hook provided by the pollz-react
package. It allows you to fetch and manage the list of available poll types from the Pollz SDK within a React component.
Parameters
The usePollTypes
hook does not take any parameters.
Return Values
The usePollTypes
hook returns an object with the following properties:
pollTypes
(PollType[] | null): An array containing the list of available poll types.null
if the poll types are still loading.refetch
(function): A function to manually refetch the list of poll types.
Usage
Last updated