Is jsonEditor.destroy() in a useEffect with dependencies the right way to unmount a React functional

Unmounting a React Functional Component Using jsonEditor.destroy() in useEffect

visit shbcf.ru