How to use the reactronica.constants.instruments function in reactronica

To help you get started, we’ve selected a few reactronica examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unkleho / reactronica / example / src / components / StepsEditorExample / StepsEditorExample.js View on Github external
<div>
          <p>
            Instrument:{' '}
            <select> {
                const selectedOption = event.target[event.target.selectedIndex];
                const type = selectedOption.getAttribute('data-type');

                dispatch({
                  type: types.UPDATE_INSTRUMENT,
                  instrumentType: type,
                });
              }}
              value={currentTrack.instrumentType}
            &gt;
              {constants.instruments.map((instrument, i) =&gt; {
                const id = `${instrument.id}-${i}`;

                return (
                  <option value="{instrument.id}" data-type="{instrument.id}" data-id="{id}">
                    {instrument.name}
                  </option>
                );
              })}
            </select>
          </p>
          <div></div></div>

reactronica

React components for making music

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages