question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: <img/> renders twice in firefox with react 18

See original GitHub issue

React version: 18.2.0

Steps To Reproduce

  1. Insert a tag <img/> with src
  2. Go to Firefox inspect tool to the tab network
  3. 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 image

The expected behavior

There is one request and one render in firefox

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:14
  • Comments:15

github_iconTop GitHub Comments

4reactions
arpitj007commented, Sep 12, 2022

It really is an issue. Where can we find the root cause of this problem?

4reactions
MiguelMachado-devcommented, Sep 12, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found