diff --git a/examples/typescript-001/src/app/app.tsx b/examples/typescript-001/src/app/app.tsx index be0ac0d..962b794 100644 --- a/examples/typescript-001/src/app/app.tsx +++ b/examples/typescript-001/src/app/app.tsx @@ -2,9 +2,15 @@ import { useSnapshot } from 'valtio'; import { proxyWithHistory } from 'valtio-history'; import React from 'react'; -const textProxy = proxyWithHistory({ - text: 'Add some text to this initial value and then undo/redo', -}); +const textProxy = proxyWithHistory( + { + text: 'Add some text to this initial value and then undo/redo', + }, + { + subscribeCallback: (ops, historySaved) => + console.log({ ops, historySaved }), + } +); const update = (event: React.ChangeEvent) => (textProxy.value.text = event.target.value);