react-joystick-component
react-joystick-component copied to clipboard
Enhance for use on mobile
Hi, thanks a lot for this.
I was wondering if you plan to have this work with mobile?
Thanks! Yes. I need to do more investigation, which i should have time for in the next 2 weeks. At present it shouldn't work with React Native as it uses div
s but I'm fairly new to RN, so I need to research the best way to do it first, but I don't think it will be too difficult.
Great to hear. Was wondering if the expectation is that reactjs alone should work on web accessed via a mobile? If that is the case then it does not work at the moment.
Yeah, I noticed that, it should be fairly simple to add just need to look for the best way to do it
Added touch support in v1.2.0, keeping this open for React Native support
Help wanted, if anyone can advise the best way of creating component for both RN and ReactDOM
@surfertas does the 1.2.0 release solve your problem?
It sure does. Thanks a lot.
I will be working on this soon to add React Native support. I've done a bit more React Native work and I think the best way would be to export via '@react-joystick-component/native'
have you had a chance to work on giving React Native support?
I'm still exploring ways to do this without inflating the package size - unfortunately the even lifecycles and styling systems in React Native are very different, so there's no easy solution, but my thoughts are:
- abstract common functionality
- create new package e.g
react-joystick-core
and store all of the core functionality there in - create a new package called
react-native-joystick-component
(or similar) - utilise the core library in both
This would require a significant rewrite, but i'll have a look into it - and get back in the next week