MediaSFU React Native
    Preparing search index...

    Function handleCreatePoll

    • Handles the creation of a poll by emitting a "createPoll" event with the provided details.

      Parameters

      • options: HandleCreatePollOptions

        The options for creating the poll.

        • poll: NewPoll
        • socket: Socket
        • roomName: string
        • OptionalshowAlert?: ShowAlert
        • updateIsPollModalVisible: (visible: boolean) => void

      Returns Promise<void>

      handleCreatePoll({
      poll: { question: "Favorite color?", type: "singleChoice", options: ["Red", "Blue", "Green"] },
      socket: socketInstance,
      roomName: "roomA",
      showAlert: (message) => console.log(message),
      updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible),
      });