The useState Composable

You can init a state on the server side using useState.

Provide a functon that returns the initial value for the state:

const state = useState(() => 'sample value')

Then this state will be available on the client side.