useAnonymousPoll()
useAnonymousPoll
useAnonymousPoll
The useAnonymousPoll
hook is a custom hook provided by the pollz-react
package. It allows you to fetch an anonymous poll using the provided poll token from the Pollz SDK within a React component.
Parameters
pollToken
(string)
pollToken
(string)The poll token for the anonymous poll you want to fetch.
Return Values
The useAnonymousPoll
hook returns an object with the following properties:
poll
(PollWithOptions | null): The fetched anonymous poll object.null
if the poll is still loading.refetch
(function): A function to manually refetch the anonymous poll data.
Usage
Last updated