How to prevent router from breaking mantine styles
Anyone setup tanstack router for use with an app that uses mantine components / styles? I've noticed that no matter where I put the <MantineProvider> tag (above router in the tree, within router in the tree, in the root route) it no longer works... specifically breaking all of the styles. I'm not super experienced with mantine or tanstack router to know why this might be breaking.
It seems like the components themselves work, but the MantineProvider doesnt seem like its providing styles to any of those components, nor is it providing css variables to css included elsewhere.
I searched and saw some mentions of polymorphic components not working or something... I have no idea if that is related at all. Basically I just dont see styles beign applied
7 Replies
exotic-emeraldOP•14mo ago
This was actually a problem with initialization of both libs. I changed the order, and handled routing setup from app.tsx and things are much better now
eager-peach•10mo ago
i think I have exactly the same problem but don't understand how you solved it. Can you please help me?
or can you give me a link to your repo where you solved it?
equal-aqua•10mo ago
can you please provide a minimal complete example to show what is not working ?
broad-brown•10mo ago
This should not be an issue, I am using mantine on my app and haven’t had any issues
continuing-cyan•9mo ago
Do you have any publicly available repo of how you configured Mantine with router
broad-brown•9mo ago
Please share a codesanbox repo and can take a look. Again mantine shouldn’t be an issue with router
continuing-cyan•9mo ago
Sure
Will share one by next few days.
Just tried again in a sample project
Seems to be working properly now in this sample project
I think it was some other weird config issue causing it on the app where I saw the error.