-
Notifications
You must be signed in to change notification settings - Fork 32
React Native Support #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
yes, the build system is already primed for multiple targets. but needs a pr to add src/native. i have no experience with RN but probably would be easy to do, i guess it also doesn't need all the hacks we have to put up with in the dom. you interested in filling in? |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 0.725 ETH (89.98 USD @ $124.11/ETH) attached to it as part of the JackCA fund.
|
@drcmda I don't have personal time for it right now but I'm experimenting with above bounty ☮️ |
hi @drcmda @JackCA I have this working in react native but it only returns the So is this ok? I can make a note of it in the documentation just to make it clear. |
@mul1sh nice. I think you should probably follow the directory structure from react-three-fiber but maybe @drcmda has feedback about that. The goal is to match the API of the web version so there's probably more to be done to match it there. |
I'm also not sure the async change is going to work in practice |
@JackCA in order to follow the directory structure of react-three-fiber, I would have to add another dependency to this project i.e. react-reconciler is this ok? |
@mul1sh are you sure? By that I just meant moving to |
@JackCA Yes we need to add |
Any thoughts @JackCA want to wrap this up by latest tomorrow |
It's possible that using that as an example was misguided on my part, because that structure may only be that way because it uses react-reconciler (which is supposed to be for custom renderers and that's definitely not what this library is). @drcmda can you speak to how @mul1sh should organize this? (and any other comments on code) |
@mul1sh @JackCA hey everyone, i wasn't online over the holidays, sorry for the delay. the async bit is a bit weird. hooks can't be awaited, that would only go for suspense. it should wait for the promise in there (.then(r => ....)) and then fill the data in. also, using the navigator ... i think it would be best to fork index.ts, rename it native.ts, remove the web bits and just add the RN stuff in there. in package.json we can link this file using the "react-native" field. this is how we're doing it with react-spring: https://github.com/react-spring/react-spring/blob/master/package.json#L7 we don't need react-reconciler for this. |
@JackCA sorry but after many testing out many fixes, I don't think there is a way to get the left, right, top and bottom co-ords of a view in react native. The only way this seems possible is if the view is wrapped by a DOM Node and then using So should I just submit it the way it is, where you will be able to get the x,y, width, pageX & pageY bounds of a view in react native as supported by the official api? |
hey @mul1sh -- I'm a little confused because you mention DOM nodes which is on the browser side of things. What is holding us back from using |
@JackCA nothing is stopping me from using 'measure' or 'measureInWindow', its just that they won't return the left, right, top and bottom co-ords for react-native views like the current api does for html dom nodes via 'getBoundingClientRect()' Sorry for the confusion this is what I meant, so should I just submit it like this or what else do you propose be done? |
@mul1sh as I'm looking at this, I'm not completely sure what different between |
Any feedback on the tests? Thanks |
I think tests would be a good idea as there are currently tests for the web version |
Finally done after a long time, preparing a PR to submit now |
Hey! Did that PR end up getting merged? |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Workers have applied to start work. These users each claimed they can complete the work by 3 weeks, 5 days ago. 1) mczenith has applied to start work (Funders only: approve worker | reject worker). 1.) Understand the problem Learn more on the Gitcoin Issue Details page. |
Is the PR up somewhere? |
Has there been any consideration for supporting react native?
The text was updated successfully, but these errors were encountered: