website
website copied to clipboard
Suggestion: mention Radix-UI is not compatible with Preact
👋
I run into this issue, and it took me a while to realize preact wasn't supported. I dev locally with React
and only use Preact
to bundle for production purposes. That made it harder to find out what was happening.
I would probably mention it somewhere in the docs as it seems to be a recurrent topic for others.
Hi @adrianmg, I have never used Preact
so I may be way off…
Is it generally assumed that anything that works with React
should work just switching to Preact
?
It doesn't seem like a good assumption to me given that some features are missing, so not sure where the community stands on this 🤔
It seems to be a recurrent topic of confusion after some googling. I always appreciate when docs help me unblock situations like this (it's not about assumptions, but helping me figure out things).
A FAQ section could be a good place to add some of these.
It's easy to find yourself in this situation especially when working with an existing codebase with Preact:
- Build doesn't throw an error, so it's hard to make the connection of why something is not working in production.
- I may not have the capacity or the knowledge to judge what's happening inside Radix to see if it's compatible or not.
I like the idea of an FAQ page :+1:
Over the Christmas holidays, this topic actually got me thinking how hard it would be to do some of our stuff without SythenticEvent bubbling (if we want to support Preact).
I reckon some cases could do away with it if we provided an alternate API but we would need to spin up a Preact build to make sure that lack of SyntheticEvents is the only incompatibility issue. I'm not sure that it is.