It will improve development experience if we'll save the cpp code every time the user hits "run simulation".
I suggest adding a tiny util which abstracts (safely) the localStorage.addItem and localStorage.removeItem.
state machine:
check if there's a localstorage entry:
yes: remove it and add a new one.
No: add one.
It will improve development experience if we'll save the cpp code every time the user hits "run simulation".
I suggest adding a tiny util which abstracts (safely) the localStorage.addItem and localStorage.removeItem. state machine: check if there's a localstorage entry: yes: remove it and add a new one. No: add one.
** see TS playground as a reference.