Hiyve Components - v1.0.0
    Preparing search index...

    Function useHandRaise

    • Access hand raise state and controls.

      Provides the set of user IDs with raised hands and actions to toggle the local user's hand or lower all hands (owner only).

      Returns {
          lowerAllHands: () => Promise<void>;
          raisedHands: Map<string, number>;
          toggleHandRaised: () => Promise<void>;
      }

      Object containing raisedHands (Set of user IDs) and actions (toggleHandRaised, lowerAllHands)

      • lowerAllHands: () => Promise<void>
      • raisedHands: Map<string, number>
      • toggleHandRaised: () => Promise<void>
      import { useHandRaise } from '@hiyve/rn-react';

      function HandRaiseButton() {
      const { raisedHands, toggleHandRaised } = useHandRaise();

      return (
      <View>
      <Button title="Raise Hand" onPress={toggleHandRaised} />
      {raisedHands.size > 0 && <Text>{raisedHands.size} hand(s) raised</Text>}
      </View>
      );
      }