# Score.onChange method

Sets the handler for when the score changes.

## Signature

    onChange(handler: (gameId: string, score: number) => void): void;

## Parameters

| Name | Type | Optional | Description |
|---|---|---|---|
| `handler` | `(gameId: string, score: number) => void` | No |   |

## Returns

`void`