Skip to content
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

Add a working example in docs as app is not working #3

Open
ashishpatel1992 opened this issue May 6, 2021 · 0 comments
Open

Add a working example in docs as app is not working #3

ashishpatel1992 opened this issue May 6, 2021 · 0 comments

Comments

@ashishpatel1992
Copy link

Please add a working example in docs.
It is crashing with error

ERROR  TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[2], "react-native-piano").MidiNumbers.fromNote')
ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.

App.tsx

import React from 'react';
// @ts-ignore
import {Piano, KeyboardShortcuts, MidiNumbers} from 'react-native-piano';
// @ts-ignore
import type {Node} from 'react';

const noteRange = {
  first: MidiNumbers.fromNote('c3'),
  last: MidiNumbers.fromNote('f5'),
};

const App: () => Node = () => {
  return <Piano noteRange={noteRange} />;
};
export default App;
@ashishpatel1992 ashishpatel1992 changed the title Add a working example in docs Add a working example in docs as app is not working May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant