Skip to content

Instantly share code, notes, and snippets.

@calindotgabriel
Created May 11, 2017 19:29
Show Gist options
  • Save calindotgabriel/15a6cd8bb0ae373cf878064a038ff6ff to your computer and use it in GitHub Desktop.
Save calindotgabriel/15a6cd8bb0ae373cf878064a038ff6ff to your computer and use it in GitHub Desktop.
dishenumergewey.react.js
import React from 'react';
import NavigationBar from './NavigationBar';
class App extends React.Component {
render() {
return (
<div className="container">
<NavigationBar/>
{/*{this.props.children}*/}
</div>
);
}
}
export default App;
bundle.js:998 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of `NavigationBar`.
in NavigationBar (created by App)
in div (created by App)
in App (created by Route)
in Route
in div
in Router (created by BrowserRouter)
in BrowserRouter
bundle.js:944 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of `NavigationBar`.
at invariant (bundle.js:944)
at instantiateReactComponent (bundle.js:10917)
at instantiateChild (bundle.js:16451)
at bundle.js:16478
at traverseAllChildrenImpl (bundle.js:11168)
at traverseAllChildren (bundle.js:11263)
at Object.instantiateChildren (bundle.js:16477)
at ReactDOMComponent._reconcilerInstantiateChildren (bundle.js:21297)
at ReactDOMComponent.mountChildren (bundle.js:21336)
at ReactDOMComponent._createInitialChildren (bundle.js:18324)
import React from 'react';
import { Link } from 'react-router';
class NavigationBar extends React.Component {
render() {
return (
<nav className="navbar navbar-default">
<div className="container-fluid">
<div className="navbar-header">
<Link to="/" className="navbar-brand">Conference</Link>
</div>
</div>
<div className="collapse navbar-collapse">
<ul className="nav navbar-nav navbar-right">
<li><Link to="/signup">Sign Up</Link></li>
</ul>
</div>
</nav>
)
}
}
export default NavigationBar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment