You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: You are manually calling a React.PropTypes validation function for the `name` prop on `Greeting`. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.
I've inherited a codebase with an interesting setup that uses an npm package (and therefore a different react instance) to render the DOM (details below). This comment makes me wonder if that could be the cause of the issue? The package is using 15.1 but the component is defined with React 15.3.2.
To test, I copied code straight from the docs so I'm quite sure that the warning isn't warranted.
I'm still getting my head around the architecture of my codebase, but it does something like this:
A node server waits for requests.
in server.js it imports a component, say App.jsx (defined with React instance 1)
in server.js it imports react-template-server (an internal library, as an npm package)
when a request comes in, it passes App.jsx to the react-template-server instance
react-template-server imports react-dom (which I guess is React instance 2?) and uses that to render the passed in component, and returns the rendered HTML.
If I take the render logic out of the package and bring it up into the app, I don't get the warning.
The text was updated successfully, but these errors were encountered:
Using different versions of react to define and render components in the same project is not supported. We can't really help here because they are just not compatible.
OS: macOs 10.12.1
Node: 6.6.0
NPM: 3.10.3
React: 15.1.0
I am getting the warning
I've inherited a codebase with an interesting setup that uses an npm package (and therefore a different react instance) to render the DOM (details below). This comment makes me wonder if that could be the cause of the issue? The package is using 15.1 but the component is defined with React 15.3.2.
To test, I copied code straight from the docs so I'm quite sure that the warning isn't warranted.
I'm still getting my head around the architecture of my codebase, but it does something like this:
server.js
it imports a component, sayApp.jsx
(defined with React instance 1)server.js
it importsreact-template-server
(an internal library, as an npm package)App.jsx
to thereact-template-server
instancereact-template-server
importsreact-dom
(which I guess is React instance 2?) and uses that to render the passed in component, and returns the rendered HTML.If I take the render logic out of the package and bring it up into the app, I don't get the warning.
The text was updated successfully, but these errors were encountered: