Sets body element style. Merges with existing styling and restores original styling on unmount.
a React / JSON style object with camelCase keys
import { useBodyStyle } from "@trashpanda001/helpers/react"function Component() { useBodyStyle({ backgroundColor: "red", color: "white" }) return <div>...</div>} Copy
import { useBodyStyle } from "@trashpanda001/helpers/react"function Component() { useBodyStyle({ backgroundColor: "red", color: "white" }) return <div>...</div>}
Sets body element style. Merges with existing styling and restores original styling on unmount.