Updating the code in the editor by updating the variable the code is stored in clears the editor history (no ctrl+z :cry: ). https://codesandbox.io/s/interesting-sky-6nvrv?fontsize=14&hidenavigation=1&theme=dark