Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Customizing Your Project

carlos .
carlos .
9,703 Points

Jumbotron css not rendering in create react app

Screenshot: of Jumbotron: https://www.dropbox.com/s/qojl7br5w8dkbqz/Screenshot%202017-07-27%2019.36.44.png?dl=0

There are three elements in the app, the jumbotron, form, and listgroup. The form and listgroup components css works fine out of the box. However the react-bootstrap Jumbotron component css is not working. What am I missing? repo: https://github.com/debtitor/search_app

App.js

import React, { Component } from 'react';
import {Grid, Jumbotron} from 'react-bootstrap';
import SearchForm from './components/SearchForm';
import Results from './components/Results';

class App extends Component {
  render() {
    return (
      <div >

  <Jumbotron>
    <grid>
      <h1>Search app</h1>
      <p>This is a simple search app</p>

      <SearchForm />
   </grid>

  </Jumbotron>
<Results />


      </div>
    );
  }
}

export default App;

index.js

import React from 'react';
import ReactDOM from 'react-dom';
import 'bootstrap/dist/css/bootstrap.css';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();

1 Answer

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,736 Points

In the terminal it gives me this warning:

Compiled with warnings.

./src/App.js
  Line 2:  'Grid' is defined but never used  no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

You have <grid> with a lowercase g, which is not the real bootstrap component. That's what's throwing off the appearance.