Repeat ReactJS Download Using Repeater Twice

I use browserify to bundle ReactJS and (among other things) a responsive router . But when I look in the console, the message ...

  Download the React DevTools for a better development experience: http://fb.me/react-devtools 

... appears twice (!), telling me that two ReactJS instances are actually working.

If I look into my JS browser, I saw the ReactJS source only once.

How would I avoid this?

package.json :

 "dependencies": { "LiveScript": "^1.3.0", "jquery": "*", "firebase": "*", "react": "0.11.2", "reactfire": "*", "react-router": "*", ... } 

When I start npm ls | grep -i react npm ls | grep -i react npm ls | grep -i react npm ls | grep -i react I get:

 ___ react@0.11.2 ___ react-router@0.9.4 ___ reactfire@0.3.0 _ ___ react@0.11.2 
+5
source share
2 answers

Launch npm dedupe . Most likely, these are two different versions of the fixes.

You should never use wildcards for dependencies. For reactfire <0.1 and reactive router ^0.9 .

+1
source

Check if you are importing a reaction with a different name. eg

 var React = require('react'); 

and

 var React = require('react'); 

will lead to a reaction reaction to import twice.

+1
source

Source: https://habr.com/ru/post/1205538/


All Articles