javascript - ReactJS not picking up css style -


i going wrong way, possible add styles , external css file within a reactjs component? have tried conventional way not seem work, reference class or id within external css , styling there.

    var profilepanel = react.createclass({   render: function() {     return (       <div>         <p class="profile-text">{this.props.text}{this.props.children}</p>           </div>     );   } }); 

and within css have:

    .profile-text{         font-size: 10px;     } 

you're using class reserved js. need use classname , should work.

read more


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -