Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined

I get

Uncaught TypeError occurs (Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined)

when I am using React JS

<script src="res/build/react-min.js"></script>
<script src="res/build/react-dom.min.js"></script>
like image 919
Kuppuswamy Avatar asked Dec 14 '15 04:12

Kuppuswamy


1 Answers

The error is thrown because the react-dom cannot find an instance of React. I suppose this has something to do with the fact you are using res/build/react-min.js instead of res/build/react.min.js

Kudos for the function name in the react-dom tho:

(function(React) {
  return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
});
like image 136
Marnix Janssen Avatar answered Oct 12 '22 15:10

Marnix Janssen