-
Hi After reading about Fluent UI 9 and styling within, it appears that all styling is done using Griffel and makeStyles, which returns a hook. Since hooks can only be used in Functional components, what approach is there for existing Class components? Is support for them deprecated? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @voyDk, v9 does not have any class components. If you really have a use for class components in your application, you can use |
Beta Was this translation helpful? Give feedback.
Hi @voyDk, v9 does not have any class components. If you really have a use for class components in your application, you can use
@griffel/core
instead of@griffel/react
, which provides similar benefits and API but is not tied to React paradigms, so it does not return a hook, just a regular function. We do not generally recommend this approach, however, so make sure you really need this if you are going to use@griffel/core
instead of@griffel/react
.