1.1.0 • Published 6 years ago

react-mobx-music v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

React Mobx Music

Install

yarn add react-mobx-music

Usage

<ReactMobxMusic instrumentNames={["accordion"]}>
  {({ isLoading, instruments }) =>
    isLoading ? (
      <div> Loading </div>
    ) : (
      <div>
        Loaded !
        <button
          onMouseDown={() => {
            instruments.get("accordion").play("A4");
          }}
          onMouseUp={() => {
            instruments.get("accordion").stop("A4");
          }}
        >
          Play A4
        </button>
      </div>
    )
  }
</ReactMobxMusic>