我想補充的風格是這樣的:流星類型錯誤:需要(...)addStyles不是一個函數
import './landing.css';
或
import { someClass } from "./landing.css";
在反應成分,收到此錯誤:
TypeError: require(...).addStyles is not a function
我使用的最後一個流星1.5.2.1
/imports/ui/pages/Landing.jsx 在陣營組成:
import React, { Component } from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
import './landing.css'
// import { someClass } from "./landing.css";
export default class Landing extends Component {
constructor(props){
super(props);
}
render() {
return (
<Grid fluid id="landing">
<Row className="show-grid">
<Col xs={12} md={12}>
<h1 className="someClass">
Landing Page
</h1>
</Col>
</Row>
</Grid>
);
}
}
/imports/ui/pages/landing.css 在./landing.css:
.someClass {
color: red
}
我是否需要一些額外的包?
顯示您正在使用的整個代碼(包含文件路徑)。 – Styx