Replies: 5 comments 9 replies
-
Hi @seenyea! The short answer is: use a native wrapper that exposes DOM. The long answer is that there are woefully few options for this. Some time ago, I had begun building a DOM interface to React Native, but I have no experience with React Native whatsoever and I'm likely not the best person to do that implementation. I do know that folks have used Preact with NativeScript and had some success: NativeScript doesn't expose a Web-compatible DOM, but its UI primitives are still quite easily mapped to DOM primitives:
It would also be relatively easy to implement a |
Beta Was this translation helpful? Give feedback.
-
I'll try |
Beta Was this translation helpful? Give feedback.
-
React Native's Gesture Responder System is different than the browser's native DOM event system that Preact uses:
This is used by Preact with Expo for Web to use React Native on web with Preact. Maybe it could be used as inspiration if going the other way: to get Preact on Native. If this is really desirable at all? Since Preact uses the browser's native DOM API's, you'd have to reimplement the DOM directly on native, or a DOM interface to React Native. (Which I don't see why anyone would like to do...) Preact doesn't seem to have the intention to do it, from what I can tell:
|
Beta Was this translation helpful? Give feedback.
-
In any case, I think the OP's original question is best understood as "What can we do to make Preact work with React Native?".
|
Beta Was this translation helpful? Give feedback.
-
what can we do to make preact works for react native?
Beta Was this translation helpful? Give feedback.
All reactions