Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Basics (retired) Thinking in Components Mocking up our Application

Carlos Lantigua
Carlos Lantigua
5,938 Points

Am I the only who's react score keeper app doesn't look like Jim's??

I have not touched the css, everything loads fine but it doesn't look like Jim's.. I get an ugly version of what prints out around the 7:38 minute mark of the video.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Scoreboard</title>
    <link rel="stylesheet" href="./app.css" />
  </head>

  <body>
    <div id="container">Loading...</div>
    <script src="./vendor/react.js"></script>
    <script src="./vendor/react-dom.js"></script>
    <script src="./vendor/babel-browser.min.js"></script>
    <script type="text/babel" src="./app.jsx"></script>
  </body>
</html>

```jsx
function Application() {
  return (
    <div className="application">
        <div className="header">
            <h1>Scoreboard</h1>
        </div>

        <div className="players">
            <div className="player">
                <div className="player-name">
                    Carlos Lantigua
                </div>
              <div className="player-score">
                  <div className="counter">
                      <button className="counter-action decrement"> - </button>
                          <div className="counter score"> 31 </div>
                      <button className="counter-action increment"> + </button>
                  </div>
              </div>
            </div>
        </div>
   </div>
  );
}

ReactDOM.render(<Application />, document.getElementById('container'));

2 Answers

Naomi Anderson
Naomi Anderson
12,725 Points

I'm the same. There's no 'players' in my CSS

Dale Severude
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,324 Points

Watch out for typos. Your "counter score" should be "counter-score".

I had issues with typing "classname" instead of "className". Any typos will create some ugly rendering of your content!