diff --git a/examples/react-use-awareness/src/App.jsx b/examples/react-use-awareness/src/App.jsx index 73c86ac43..17ea172de 100644 --- a/examples/react-use-awareness/src/App.jsx +++ b/examples/react-use-awareness/src/App.jsx @@ -25,18 +25,26 @@ export function App({ userId }) { return (
- - updateLocalState((state) => ({ - ...state, - count: e.target.value, - })) - } - /> +

+ This is an example of useAwareness, which is used to share ephemeral state that won't be saved to the document. + It's most commonly used for showing which peers are online and their cursor positions, but you can use any serializable data you'd like. +

+
+
+ Ephemeral state: + + updateLocalState((state) => ({ + ...state, + count: e.target.value, + })) + } + /> +
Doc state: