zya / beet.js

Polyrhythmic Sequencer library for Web Audio API.
http://zya.github.io/beet.js
MIT License
114 stars 17 forks source link

Using Beet with ReactJS #19

Open lukecd opened 1 year ago

lukecd commented 1 year ago

Hi ... Perhaps this is super obvious, but I'm stuck for sure. Do you have guidelines on how to use Beet.js with React?

Thanks!

lukecd commented 1 year ago

Hmmm, perhaps the problem isn't the react integration.

I tried including the library with import * as Beet from 'beet.js';

And I end up getting this in my dev console

bootstrap:27 Uncaught ReferenceError: arguments is not defined at ./node_modules/webworkify/index.js (index.js:1:1) at options.factory (react refresh:6:1) at webpack_require__ (bootstrap:24:1) at fn (hot module replacement:62:1) at ./node_modules/wa-metro/lib/wa-metro.js (wa-metro.js:1:1) at options.factory (react refresh:6:1) at webpack_require__ (bootstrap:24:1) at fn (hot module replacement:62:1) at ./node_modules/wa-metro/index.js (index.js:1:1) at options.factory (react refresh:6:1)

Nothing explicitly references Beet.js, but removing the import does cause the error to go away. 

Besides Beet, I'm currently using Tone and Tonal with no problems.

Thanks