reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11k stars 7.51k forks source link

[Bug]: Reusing Logic with Custom Hooks docs example doesn't work with firefox #7088

Open marcadrian-it opened 1 month ago

marcadrian-it commented 1 month ago

Summary

On Firefox, for example with the code snippet that adds the event listener for 'online/offline' events. When the user goes offline, no event is triggered. In contrast to the Chromium browser, where everything works as expected. I'm curious why, given that both browsers support Navigator.onLine

Page

https://react.dev/learn/reusing-logic-with-custom-hooks

Details

No response