Replies: 1 comment
-
@telcy with this API, would that mean we'd only need to do the setup work in +1 I have found integrating CSS-in-JS experience to be quite a PITA with every SSR framework as well; Its also a reason I haven't upgraded Ant Design v4 to v5 in a few internal Remix apps at work, since V4 was pure css based. ExampleIt looks like the primary use case for ![]() benefits of
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current way of using UI frameworks like MUI is not ideal and involves editing multiple files (entry.client.ts, entry.server.ts, root.tsx etc.) to set up everything correctly. This is ok (not ideal) for using MUI globally but makes it difficult to limit the use of MUI to some dashboard routes.
https://github.com/mui/material-ui/blob/master/examples/material-ui-remix-ts/app/entry.client.tsx
https://github.com/mui/material-ui/blob/master/examples/material-ui-remix-ts/app/entry.client.tsx
https://github.com/mui/material-ui/blob/master/examples/material-ui-remix-ts/app/root.tsx
Nextjs offers a hook
useServerInsertedHTML
that simplifies the use of MUI/ Emotion.https://github.com/mui/material-ui/blob/ffa4751a513cee56a8cd069c788a209d8beae7c7/examples/material-ui-nextjs-ts/src/components/ThemeRegistry/EmotionCache.tsx#L4
Then we can use
ThemeRegistry
anywhere in our app.https://github.com/mui/material-ui/blob/ffa4751a513cee56a8cd069c788a209d8beae7c7/examples/material-ui-nextjs-ts/src/app/layout.tsx#L46C19-L46C19
I think an easier and more straightforward way of implementing UI frameworks might greatly increase adoption.
Beta Was this translation helpful? Give feedback.
All reactions