You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[`useGlobal()`](#useglobal)| A hook for inserting transient global styles into the DOM. These styles will be injected when the hook mounts and flushed when the hook unmounts. |
77
-
|[`useTokens()`](#usetokens)| A hook for inserting transient CSS tokens into the DOM. These tokens will be injected when the hook mounts and flushed when the hook unmounts. |
78
-
|[`useThemes()`](#usethemes)| A hook for inserting transient CSS theme tokens into the DOM. These tokens will be injected when the hook mounts and flushed when the hook unmounts. |
|[`useCSS()`](#usecss)| A hook for [performantly and reliably](https://github.com/reactwg/react-18/discussions/110) inserting CSS into the DOM in React 18 using the `useInsertionEffect` hook. |
77
+
|[`useGlobal()`](#useglobal)| A hook for inserting transient global styles into the DOM. These styles will be injected when the hook mounts and flushed when the hook unmounts. |
78
+
|[`useTokens()`](#usetokens)| A hook for inserting transient CSS tokens into the DOM. These tokens will be injected when the hook mounts and flushed when the hook unmounts. |
79
+
|[`useThemes()`](#usethemes)| A hook for inserting transient CSS theme tokens into the DOM. These tokens will be injected when the hook mounts and flushed when the hook unmounts. |
79
80
80
81
### Server rendering
81
82
@@ -134,6 +135,44 @@ export const App = () => {
134
135
135
136
---
136
137
138
+
### useCSS()
139
+
140
+
A hook for [performantly and reliably](https://github.com/reactwg/react-18/discussions/110) inserting CSS into the DOM in React 18 using the
141
+
`useInsertionEffect` hook.
142
+
143
+
#### Example
144
+
145
+
[Play with an example on **CodeSandbox**](https://codesandbox.io/s/dash-ui-react-usecss-example-gi3o6o)
0 commit comments