You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust a copy of one window's performance tab to use 6x throttling
Spam the light / dark switcher
Current behavior
The tabs are reading, rerendering, and causing other events to communicate back and forth probably based on local storage hooks. This can cause them to hit infinite loops in all tabs.
Expected behavior
No infinite loops.
Context
The reproduction repo here is very silly. We found this bug in our real application, which renders a number of complex SVG's and other expensive operations. A user had just two tabs open, and was able to cause it with a simple double click on the theme switcher.
I wonder if there's neutral ground to be established by adjusting theme mode auto. Perhaps while it's on auto, it just reads the browser preference only, and never even enables the local storage hooks. Maybe there's an option opt in or out of the local storage hooks?
The text was updated successfully, but these errors were encountered:
No real code yet, but just reviewing what it currently does I have some questions:
Why is there both a local storage watcher and an event watcher?
I considered using a debounce around handleSetMode, but in automated scenario, it's possible this could break tests. They could test the page, swap dark, test the page, and swap again within the debounce timeout.
Steps to reproduce
Clone reproduction repo. Basically npm create flowbite-react@latest.
Current behavior
The tabs are reading, rerendering, and causing other events to communicate back and forth probably based on local storage hooks. This can cause them to hit infinite loops in all tabs.
Expected behavior
No infinite loops.
Context
The reproduction repo here is very silly. We found this bug in our real application, which renders a number of complex SVG's and other expensive operations. A user had just two tabs open, and was able to cause it with a simple double click on the theme switcher.
I wonder if there's neutral ground to be established by adjusting theme mode
auto
. Perhaps while it's on auto, it just reads the browser preference only, and never even enables the local storage hooks. Maybe there's an option opt in or out of the local storage hooks?The text was updated successfully, but these errors were encountered: