javascript - How do I use Semantic UI with React and Express? -
i'm new semantic/react/express. how include stylesheet semantic in react? need html file directly links semantic css/javascript files? right now, i'm not using html files.
my main page, dashboard.jsx
:
var react = require('react'); var layout = require('./layout'); class dashboard extends react.component { render() { return ( <layout title={this.props.title}> <h1>{this.props.title}</h1> <div class="ui 3 item menu"> <a class="active item">editorials</a> <a class="item">reviews</a> <a class="item">upcoming events</a> </div> </layout> ); } } dashboard.proptypes = { title: react.proptypes.string }; module.exports = dashboard;
use classname
instead of class
in react components.
and use classes import css file in html file. react renders code html in end, if .css
file exists in imports classes applied.
to import css add html file:
<link rel="stylesheet" href="your_css_here.css">
Comments
Post a Comment