#Will Mantine 7 work with server components?
6 messages · Page 1 of 1 (latest)
No, all Mantine components use useContext.
I think maybe this needs to be added in FAQ? I can see a lot of people are already asking this
I must admit I thought the whole point of moving away from CSS in JS was to support server components but I just wanted to check. With React moving towards server rendering I’m now questioning the use of UI frameworks in my future projects. There must be a way to support this?
I must admit I thought the whole point of moving away from CSS in JS was to support server components but I just wanted to check.
yes, but not immediately:
long-term goal is to make Mantine working with upcoming React features: server streaming, server components, app dir, etc. React, Remix and Next.js teams are not very positive about css-in-js future and, honestly, neither do I lately. That said – less dynamic styles is less problems to solve once we need to move forward from emotion.
#💭-feedback message
for now, the new move away from CSS-in-JS will help with server-side rendering, but not server components
With React moving towards server rendering I’m now questioning the use of UI frameworks in my future projects. There must be a way to support this?
you should also be questioning server components too. server components are designed for no interactivity, so event handlers, state, context, everything that can "change" will not work on them at all. unless react team + contributors can design something to change that, it will be limited and you will not be able to do everything you can usually do. this is not a UI library exclusive problem either, a lot of third party react ecosystem will not work properly until this is changed
while RSC is definitely "the next big thing", i would not really recommend jumping on board yet, it's basically just glorified data fetching