-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React.createElement: type should not be null, undefined, boolean, or number. #2220
Comments
You're importing something incorrectly, most likely |
Does this mean we need to use an es6 compiler to use react router now? |
No, you can use the standard |
I would still need to use something like babel though... |
Use e.g. |
Ahhh, I see. Thanks. |
Getting this same problem, but in the browser. Using:
This is actually for a class :) I wouldn't use the in-browser transform in a real app. |
I'm running into this same error, upgrading from v.0.13.3 to v1.0.0-rc4:
My main code: import React from 'react';
import ReactDOM from 'react-dom';
import {DefaultRoute, Route, Router} from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import {About, LeaderboardPage, Profile, TopNav, Validate} from '../components';
var App = React.createClass({
render: function () {
return (
<div className="dvt">
<div className="dvt-nav-top">
<TopNav />
</div>
<div className="dvt-content">
{this.props.children}
</div>
</div>
);
}
});
let browserHistory = createBrowserHistory();
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App}>
<DefaultRoute component={About} />
<Route path="about" component={About} />
<Route path="leaderboards" component={LeaderboardPage} />
<Route path="profile" component={Profile} />
<Route path="validate/:projectId" component={Validate} />
</Route>
</Router>
), document.getElementById('app')); |
Thanks for your question! We want to make sure that the GitHub issue tracker remains the best place to track bug reports and feature requests that affect the development of React Router. Questions like yours deserve a purpose-built Q&A forum. Would you like to post this question to Stack Overflow with the tag #react-router? https://stackoverflow.com/questions/ask?tags=react-router. We also have an active and helpful React Router community on Reactiflux, which is a great place to get fast help with React Router and with the rest of the React ecosystem. You can join at https://discord.gg/0ZcbPKXt5bYaNQ46. |
This solved my issue: #1799 |
https://codereviewvideos.com/blog/warning-react-createelement/ Check this out. |
For future googlers who come across this error, by upgrading from 0.24 -> 0.26 react-native Check if: And a name has been defined in the class. |
I'm trying to upgrade to v1.0.0 and I'm running into some really basic issues
This generates React.createElement: type should not be null, undefined, boolean, or number. This is using react-router 1.0.0-rc3, react 0.14 and webpack. It appears Router is returning an Object instead of a Function?
The text was updated successfully, but these errors were encountered: