Handles the creation of a poll by emitting a "createPoll" event with the provided details.
handleCreatePoll({ poll: { question: "Favorite color?", type: "singleChoice", options: ["Red", "Blue", "Green"] }, socket: socketInstance, roomName: "roomA", showAlert: (message) => console.log(message), updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible),}); Copy
handleCreatePoll({ poll: { question: "Favorite color?", type: "singleChoice", options: ["Red", "Blue", "Green"] }, socket: socketInstance, roomName: "roomA", showAlert: (message) => console.log(message), updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible),});
The options for creating the poll.
Handles the creation of a poll by emitting a "createPoll" event with the provided details.
Example