mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
The useLocalStorage hook synchronizes state between windows. In the case of the activities tabs, we don't want this state synchronized, otherwise changing a tab in one window would change the tab in all open windows. Instead, we can use sessionStorage so that the state persists when refreshing or duplicating a browser tab. Local storage is still used as the default value so that any new window that is opened will use the last selected state. Issue: https://github.com/pybricks/support/issues/807