src/utils/cloudState.js
.AuthProvider
component:client.hooks
to interact with the server. client.hooks.useCloudState
hook works a lot like React's useState
hook. useState
hooks store data locally within the React component, whereas useCloudState
store data in the CloudState server, while maintaining a local copy.field
, which acts like a key for the data in the server.