Skip to content

Commit 547eed3

Browse files
committed
fix useXRControllerButtonEvent types and docs
1 parent 44fc690 commit 547eed3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/xr/src/controller.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export const XRControllerComponent = forwardRef<
5050

5151
/**
5252
* Hook for subscribing to a button state change event on the controller
53+
* @param controller the controller to listen for the event
5354
* @param id of the button
5455
* @param onChange callback that gets executed when the state of the button changes
55-
* @param handedness of the controller
5656
*/
5757
export function useXRControllerButtonEvent(
58-
controller: XRControllerState,
58+
controller: XRControllerState | undefined,
5959
id: XRControllerGamepadComponentId,
6060
onChange: (state: XRControllerGamepadComponentState['state']) => void,
6161
): void {

0 commit comments

Comments
 (0)