How to use reactronica - 4 common examples

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 / website / components / DAWTrackInfo / DAWTrackInfo.tsx View on Github external
effectId: selectedEffect.id,
              effectType: selectedEffect.type,
            });

            setSelectedEffect(null);
          }
        }}
      >
        <select value="{selectedEffect"> {
              return {
                label: effect.name,
                value: effect.id,
              };
            }),
          ]}
          onChange={(selectedOption) =&gt; {
            const id = selectedOption.value;
            const type = selectedOption.value;

            setSelectedEffect({ id, type });
          }}
        /&gt;
        {/* </select> {
            const selectedOption = event.target[event.target.selectedIndex];
github unkleho / reactronica / website / components / DAWTrackInfo / DAWTrackInfo.tsx View on Github external
//   setSelectedEffect(null);
  // }, [currentTrackId]);

  if (!currentTrack) {
    return null;
  }

  return (
    <div>
      <h2>Track</h2>
      <p>{currentTrack.id}</p>

      <h3>Instrument</h3>
      <select value="{currentTrack.instrumentType}"> {
          return {
            label: instrument.name,
            value: instrument.id,
          };
        })}
        onChange={(selectedOption) =&gt; {
          // const selectedOption = event.target[event.target.selectedIndex];
          // const type = selectedOption.getAttribute('data-type');

          dispatch({
            type: types.UPDATE_INSTRUMENT,
            instrumentType: selectedOption.value,
          });
        }}
      /&gt;
      {/* </select></div>
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>
github unkleho / reactronica / example / src / components / StepsEditorExample / StepsEditorExample.js View on Github external
setSelectedEffect(null);
              }
            }}
          &gt;
            <select> {
                const selectedOption = event.target[event.target.selectedIndex];
                const id = selectedOption.getAttribute('data-id');
                const type = selectedOption.getAttribute('data-type');

                setSelectedEffect({ id, type });
              }}
            &gt;
              <option>None</option>
              {constants.effects.map((effect, i) =&gt; {
                const id = `${effect.id}-${i}`;

                return (
                  <option id="==" selected="{selectedEffect" data-type="{effect.id}" data-id="{id}">
                    {effect.name}
                  </option>
                );
              })}
            </select>{' '}
            <button type="submit">Add Effect</button>

reactronica

React components for making music

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages