elmarti / react-joystick-component

Tiny, multitouch, component driven joysticks in react
MIT License
86 stars 27 forks source link

Add this component failed, report `button` must be a function (received `undefined`) #67

Closed Water-bamboo closed 11 months ago

Water-bamboo commented 11 months ago

Describe the bug Invariant Violation: View config getter callback for component button must be a function (received undefined). Make sure to start component names with a capital letter.

To Reproduce Steps to reproduce the behavior:

  1. npx react-native init TempProject
  2. yarn add react-joystick-component
  3. add joystick as README.MD descripted.
  4. yarn react-native run-android --verbose
  5. See error

Expected behavior Show the Joystick view

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context No special code, just add the Joystick view as README descripted.

elmarti commented 11 months ago

Hi @Water-bamboo unfortunately this component doesn't support React Native (at present) as we're using raw HTML elements. It's on my radar, but I don't know when i'l find time soon to work on this: https://github.com/elmarti/react-joystick-component/issues/9#issuecomment-1551639227