Peer to peer votes as simple as sharing your vote link and letting people give you their feedback. Questions and poll options update in realtime using a shared state enabled by WebRTC.
Using react-peerjs-hooks, a library I built for projects like this, we expose a simple type safe hook for WebRTC data sharing.
# Host side
const [partnerState, myState, setMyState, isConnected, myID] =
useHostPeerSession<StateInterface>({
message: "Hi I'm hosting",
color: '#00e5ff',
});
# Peer side
const [partnerState, myState, setMyState, isConnected] =
useJoinPeerSession<StateInterface>(peerID, {
message: 'Hi there I joined',
color: '#ff7700',
});