Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught Error: Minified React error #306 ,Mac OS Firefox browser

Tags:

reactjs

react 16.14.0 On my Mac. Firefox reported an error. I searched for a long time and couldn't find a solution. I tried to change the route in the project, but it still hasn't been solved,Chrome and edge are normal, and Firefox version is 100.0.1 (the latest version)

https://reactjs.org/docs/error-decoder.html/?args=undefined&args=&invariant=306

error img

like image 728
Fy Wang Avatar asked Dec 12 '25 04:12

Fy Wang


1 Answers

In my case I was lazy loading a default component from a file that had another component exported from it.

export const Comp = () => <></>

const Comp2 = () => <></>

export default Comp2

The solution was to separate the components into two files to clarify the code splitting.

like image 146
dev Avatar answered Dec 13 '25 22:12

dev