base_ui/utils/useState.ts

4 lines
189 B
TypeScript
Raw Permalink Normal View History

2025-02-01 09:34:55 +00:00
// The useState composable creates a reactive and SSR-friendly shared state.
// Create a reactive state and set default value
const myValue = useState("myValue", () => 'this is my vlaue');