'how to stop react-piano-roll component from duplicating itself on state update

i have a react component in which im using react-piano-roll component, the problem is when i update my component's state, react-piano-roll component replicates itself,

here is link code https://codesandbox.io/s/prod-water-q3eg4p?file=/src/App.js

thank you for your time and suggestions



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source