摘要: react中的css在一个文件中导入,是全局的,对其他组件标签都会有影响。 使用styled-components第三方模块来解决,并且styled-components还可以将标签和样式写到一起,作为一个有样式的组件,这样样式就是这个组件的私有样式,不会给其他组件造成影响,也很方便。 下包: np 阅读全文
posted @ 2019-12-21 19:24 盛俊勇 阅读(1309) 评论(0) 推荐(0)
摘要: html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, i 阅读全文
posted @ 2019-12-21 17:22 盛俊勇 阅读(383) 评论(0) 推荐(0)
摘要: react-redux是配合redux一起使用的,其中核心组件是Provider Provider是store的提供器,用Provider则store就无需直接引入组件内,而且还可以将一个store公共存储数据区域提供给多个组件 注意一下:之前store相关api导入的是redux, 而Provid 阅读全文
posted @ 2019-12-21 13:20 盛俊勇 阅读(276) 评论(0) 推荐(0)