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 React Basics (retired) Thinking in Components Properties

hi i try to code in local host

i try to code in local host. my code seem working, all component appear the same as the video, but my button not showing any color (only black and white, not red and green like the video) ---------------------file : index.js-----------------------------------

const React = require('react'); const ReactDOM = require('react-dom'); var createReactClass = require('create-react-class');

let Application = createReactClass({
        render:function (){
            return(
                <div className="scoreboard">
                    <div className="header">
                        <h1>Scoreboard</h1>
                    </div>

                    <div className="players">
                        <div className="player">
                            <div className="player-name">
                                JIm hoder
                            </div>
                            <div className="player-score">
                                <div className="counter">
                                    <button className="counnter-action decrement"> - </button>
                                    <div className="counter-score">31 </div>
                                    <button className="counnter-action increment"> + </button>
                                </div>
                            </div>
                        </div>

                        <div className="player">
                            <div className="player-name">
                                JIm hoder
                            </div>
                            <div className="player-score">
                                <div className="counter">
                                    <button className="counnter-action decrement"> - </button>
                                    <div className="counter-score">31 </div>
                                    <button className="counnter-action increment"> + </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>   
            );
        }

});

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

-----------------------------------// end file index.js----------------------------------

file : index.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>My app</title> <link rel="stylesheet" href="app/app.css"> </head> <body> <div id="container"></div> <script src="/app/bundle.js"></script> </body> </html>

-----------------------------------// end file index.html------------------------

2 Answers

You are misspelling their clases... You put counnter-action, it should be counter-action...

Gustavo Winter
PLUS
Gustavo Winter
Courses Plus Student 27,382 Points

Hi, could you post the css file.

CSS has a hard cascading style sheets, some times the cascading is overloading.

Check if the className is exactly the same and if there are any other class who canoverload.