website icon indicating copy to clipboard operation
website copied to clipboard

Suggestion: mention Radix-UI is not compatible with Preact

Open adrianmg opened this issue 2 years ago • 3 comments

👋

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.

adrianmg avatar Dec 29 '21 02:12 adrianmg

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 🤔

benoitgrelard avatar Jan 03 '22 17:01 benoitgrelard

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.

adrianmg avatar Jan 03 '22 20:01 adrianmg

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.

jjenzz avatar Jan 10 '22 11:01 jjenzz