The hook attribute can be used to specify a function to be called when the sync var changes value on the client.