【发布时间】:2020-12-25 09:45:41
【问题描述】:
如何在 React js 中使用 Font Awesome?如果我在我的项目中使用它,它不会出现。这是我的代码:
import React ,{Component} from 'react'
import './category.css'
import axios from 'axios'
import Course from './courses/course.js'
import Searchfilter from './search/search.js'
class Category extends Component{
state={
category :[]
}
componentDidMount(){
axios.get('data.json').then(res =>{this.setState({category:res.data.content})
})
}
render(){
return (
<div className="category">
<Course corses={this.state.category} />
</div>
)
}
}
export default Category;
【问题讨论】:
-
你的意思是字体真棒??
-
哦对 :D 你知道我怎么用它
-
Font Awesome 有一个 dedicated page 来帮助您使用 React 获得有效的实现。
标签: javascript reactjs font-awesome