Looking for documentation on gluestack-ui v2 with NativeWind? Refer to this
link.
useToken
useToken is a custom hook to resolves design tokens from the theme.
Import
To use the useToken in your project, import useTokenfrom@gluestack-ui/themed as demonstrated below.
import { useToken } from "@gluestack-ui/themed"
Let's use our useToken value to give background color to View from react-native.
import { View } from "react-native"
import { useToken } from "@gluestack-ui/themed"
const resolvedGreen = useToken("colors", "green500")
backgroundColor: resolvedGreen,