sys-bio / AntimonyEditor

Antimony Web Editor: A Web Editor for the Antimony Modeling Language
https://sys-bio.github.io/AntimonyEditor/
MIT License
0 stars 1 forks source link

Persist selected file and content across browser refresh #11

Closed SamChou05 closed 6 months ago

SamChou05 commented 8 months ago

I store the selected file index to local storage using useEffect in the file explorer and then get the index stored in the local storage to get the content from the selected file. This keeps the selected file highlighted and its contents on the screen even if the page refreshes.