useOS
useOS
is a custom hook that returns the user's OS.
Your os is "undetermined"
const os = useOS()
return <Text>Your os is "{os}"</Text>
If you use this code, you need to add
"use client"
to the top of the file.Usage
import { useOS } from "@yamada-ui/react"
import { useOS } from "@/components/ui"
import { useOS } from "@workspaces/ui"
const os = useOS()