Bug: <img/> renders twice in firefox with react 18
See original GitHub issueReact version: 18.2.0
Steps To Reproduce
- Insert a tag
<img/>
with src - Go to Firefox inspect tool to the tab network
- Reload the page and watch image request in network
Link to code example: https://codesandbox.io/s/unruffled-jerry-9hli44?file=/src/App.js
The current behavior
There are two request for image in firefox, image renders twice
The expected behavior
There is one request and one render in firefox
Issue Analytics
- State:
- Created a year ago
- Reactions:14
- Comments:15
Top Results From Across the Web
React 18 strict mode causing component to render twice
The changes to strict-mode in React version 18 causes my code to render twice, which causes an error in axios abort controller, ...
Read more >React Components rendered twice — any way to fix this?
In most cases it will throw an error message into the browser console log. It fails to automatically detect render side effects as...
Read more >react-dropzone
Important: if you omit rendering an <input> and/or binding the props from getInputProps() , opening a file dialog will not be possible. Refs....
Read more >Bug List - Mozilla
Bug List. This is Bugzilla: the Mozilla bug system. ... Wed Aug 18 09:56:01 PDT 1999 ... VERI, FIXE, [PP]External CSS styles cause...
Read more >Firefox images pasting twice - Reddit
It appears to be a bug with electron, that signal fixed by updating to electron 14. https://github.com/signalapp/Signal-Desktop/issues/5510.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It really is an issue. Where can we find the root cause of this problem?
There is, check https://codesandbox.io/s/unruffled-jerry-9hli44?file=/src/index.js On Edge and Firefox I still getting 2 requests, disabling strict-mode it stops.