bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.99k stars 144 forks source link

Does this work with React Native? #421

Closed ofersadgat closed 1 month ago

ofersadgat commented 1 month ago

There doesnt seem to be any documentation around this. I tried to look at the code and theres a bit:

tagName: Type = "div",

which make it seem like you could pass in View instead? Thanks for the work!

bvaughn commented 1 month ago

No. This supports react-dom only.

ofersadgat commented 1 month ago

Out of curiosity, do you know if it would be difficult to add support? (not asking you to, just curious if it might be worthwhile to try myself) What assumptions are made which this would break? Again, thanks for the work (and insanely fast response time!)

bvaughn commented 1 month ago

Yeah, no problem. :)

Would probably be pretty involved. This library builds on top of flex box layout for sizing and listens to DOM pointer events for triggers. I think both could be reimplemented for RN, but the code wasn't written to be portable like that so you'd likely end up ripping out a bunch of things.