采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
./src/style.js Line 3: 'injectGlobal' is not defined no-undef Search for the keywords to learn more about each error.
v4.0 更换成了 createGlobalStyle
style中
定义const GlobalStyle = createGlobalStyle``
export default GlobalStyle
在App组件中
import store from './store';
<Provider store={store}> <Fragment> <Header/> <GlobalStyle/> <GlobalStyleIconfont/> </Fragment></Provider>
文档https://www.styled-components.com/docs/api
嗯嗯,非常感谢
登录后可查看更多问答,登录/注册
主流新技术 React-redux,React-router4,贯穿基础语法
5.0k 22
5.3k 20
1.8k 19
3.8k 17
1.3k 13