Skip to content

Instantly share code, notes, and snippets.

@Joeltbond
Created January 6, 2018 22:55
Show Gist options
  • Save Joeltbond/a6f01ab998d25d24901899f347d3f7c5 to your computer and use it in GitHub Desktop.
Save Joeltbond/a6f01ab998d25d24901899f347d3f7c5 to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import { connect } from "react-redux";
import { appMounted } from "../redux_modules/app";
import MidiInput from "../components/MidiInput";
class App extends Component {
componentDidMount() {
this.props.appMounted();
}
render = () => <MidiInput notes={this.props.notes} />;
}
const mapStateToProps = state => ({
notes: state.app.notes
});
export default connect(mapStateToProps, { appMounted })(App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment