-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Remix support #39765
Comments
@samuelsycamore I have MUI working with renderToPipeableStream using this sample: https://github.com/remix-run/examples/blob/main/chakra-ui/app/entry.server.tsx |
I have this issue where if I import like so:
The same problem came up for me before and I solved it by changing
to
Basically to reproduce,
|
the provided remix template is old and not compatible, packages and layout is obsolete. please provide an up-to-date remix admin template for MUI with internationalization |
Hello, I have just tried this one out and it may be outdated as I got the following error: I skipped importing that Response (whatever it is) and tried with the base FetchAPI Response class, and got the following error: The full code of trying this one is the following
|
Remix used to ship a specific Response type that allowed you to dump in a ReadWriteStream into the Response, instead of maintaining that full Response object they now maintain a // Import
import { createReadableStreamFromReadable } from "@remix-run/node";
// Other Code
//
//
resolve(
new Response(createReadableStreamFromReadable(stream), {
headers: responseHeaders,
status: responseStatusCode,
})
); |
Is it possible to use material ui with remix spa mode? |
The current Remix example is a bit outdated and hard to integrate with new Remix templates. I created a brand new integration (with Remix 2.8 + Vite). It helps alot in quick and smooth MUI + Remix integration and also addresses some challenges mentioned here. Headsup! I am not great with Emotions. But just cross checking with current Remix + MU integration example, it seems it is working as expected with no need to use complex cache/style management. |
Thank you so much for this. I was pounding my head for the last 4 hours until I just found this. Incorporating your MuiProvider.tsx file into my entry files was the trick I needed to incorporate MUI into my Remix app. The current "official" example is impossible to decipher as a newbie to Remix working on the current default template. |
@mahmoudmoravej would you like to update the current example we have and open a PR, we can then check what changes you've made. |
@mnajdova I did it but I am not sure it will be so helpful, becasue:
I still think the PR I provided above(which simply added MUI on top of the latest version of Remix/Vite template) shows a better understanding of what and how it has been doe. |
The official example uses I used the starter from @mnajdova: https://github.com/mahmoudmoravej/remix-mui and it seems to work very well so far. Much simpler, streaming (defer/suspense/await) seems to work fine, hot-reloading etc all seems to work perfectly. |
Thank you so much for this! It really helped! |
my guy - if I could tip you I would. Spent a full day going round and round in circles and this example just works! |
I've started experimenting with using Material UI and Joy UI components with Remix and I've run into a few bugs and blockers along the way. Browsing the issues here, I see several open threads where folks are discussing the same problems I've bumped into, so I thought it might be helpful to create an umbrella issue to bring all those discussions to one centralized, up-to-date location where folks can track the progress.
Here are all of the open issues I could find—some are overlapping, others are probably pretty outdated and possibly no longer relevant but I haven't dug too deeply into each one:
Open
prepend: true
to emotion cache breaks remix example #30359useTheme
doesn't reflect custom theme values when used with Remix SSR setup #31233Problems
Here are the biggest things I see after reviewing these issues:
renderToPipeableStream()
function doesn't work with Emotion, causing hydration issuesentry.client.tsx
andentry.server.tsx
if it can be avoided/minimizedPotential solutions
serverModuleFormat: 'cjs',
toremix.config.js
to get around this problem, but it didn't work for me when I tried it—maybe I'm missing somethingExamples and docs
There are several things we could do to improve the documentation around Remix + MUI!
If there are any other known issues or requests to improve the DX, please share them here!
The text was updated successfully, but these errors were encountered: