I've built my own for a midi-cv controller for modular synth, and it was way more work than I anticipated. I'm curious if other complete and flexible solutions exist?
You can send and receive MIDI messages with this library both from the browser and within a Node context.
Along the lines of the React/browser lifecycle, I would be careful with listening to MIDI inputs.
You have to add guards for when an input no longer exists and be careful when creating listeners. React Hooks help with this but it's easy to create footguns if you're reading and sending MIDI data.