0.1.5 • Published 8 years ago

react-soundjs v0.1.5

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

react-soundjs

Connect react components to SoundJS. A short snippet can get this running.

class App extends React.Component {
  construct() {
    // ...
  }
  addItem() {
    // ...
  }
  removeItem() {
    // ...
  }
  render() {
    return (<SoundContext soundjs={create.Sound}>
      <div>
        <h1>react-soundjs Example</h1>
        <div onClick={this.addItem}>Add Item</div>
        <div>
          <SoundRegister sounds={[c4, g4]} />
          {this.state.items.map((item, index) => (
            <div key={index} onClick={this.removeItem} dataIndex={index}>
              <Sound onMount={c4} onUnmount={g4} />
              [x] {item.name}
            </div>
          ))}
        </div>
      </div>
    </SoundContext>);
  }
}
0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago