Update: In the handleSuccess callback I added a few lines stop the stream. It was a little disconcerting navigating to a new page and having the camera light still on.
stream.getTracks().forEach(function (track) {
track.stop(); // e.g. turn camera off, etc
});
In a future version, I'll store the device stream in a ref and run similar code when unmounting the React component.