Category: Typefaces
Category: Books about personality types
Category: 2006 non-fiction booksQ:
'undefined is not a function' on React (Edit: got solution)
I'm writing React code with React-Bootstrap. When I render a 'React-Bootstrap' component, I get an error: "undefined is not a function". It's mostly about how I declare my React-Bootstrap buttons, but I'm not sure what causes the error.
If I render the component into a standard div element, the error goes away, so it has something to do with the react-bootstrap components.
App.js
import React, { Component } from'react';
import './App.css';
import Navbar from "./components/Navbar";
import Container from "./components/Container";
import Footer from "./components/Footer";
export default class App extends Component {
render() {
return (
My first app
Here's the footer.
);
}
}
Navbar.js
import React, { Component } from'react';
import './Navbar.css';
import { NavbarBrand } from'react-bootstrap';
import Nav from'react-bootstrap/lib/Nav';
import {Link} from'react-router-dom';
import { NavItem, NavLink } from'react-bootstrap';
class Navbar extends Component {
render() {
return ( ac619d1d87
Related links:
Comments