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: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of Navbar.
The Navbar.jsx file has a typical layout for a menu. The only Router element in there is <Link>.
Getting the Link dependency using:
import Router from 'react-router';
var {Link} = Router;
is causing this problem.
If I switch to using:
import {Link} from 'react-router';
Then the error goes away and everything works.
To me this looks like a ES6/Babel issue and not a React Router issue. I wanted to check here first to confirm that or can anyone see what I'm doing wrong with my destructuring?
The text was updated successfully, but these errors were encountered:
It's not an "issue", it's that in one case you're doing a default import while in the other case you're doing a named import, and the semantics are not the same when using ES6 modules.
I was getting errors that look like this:
The Navbar.jsx file has a typical layout for a menu. The only Router element in there is
<Link>
.Getting the Link dependency using:
is causing this problem.
If I switch to using:
Then the error goes away and everything works.
To me this looks like a ES6/Babel issue and not a React Router issue. I wanted to check here first to confirm that or can anyone see what I'm doing wrong with my destructuring?
The text was updated successfully, but these errors were encountered: