docview.go

1package ygo
2
3// Hook is a function that can be called at various points in the sync lifecycle.
4// It receives the document to allow reading or modifying document state.
5// The hook is called after an update is received from other clients via the y-sweet server.
6type Hook func(*Doc) error