[英]Reactjs, React, styled-components - Does Rebass library object literal based props rerender components unnecessary?
I am new to react and wondering using react with REBASS : https://github.com/rebassjs/rebass for ui component design and responsiveness, but syntax i say bothers me as they are objects created in render function. 我很反应并想知道使用REBASS的反应: https : //github.com/rebassjs/rebass用于ui组件设计和响应,但语法我说困扰我,因为它们是在渲染功能中创建的对象。 Doesn't it will create unnecessary re-renders ?
它不会创建不必要的重新渲染吗?
if not why not. 如果不是为什么不。 Not able to understand.
无法理解。
<Box css={**{color:blue}**} width={**[1,1/2,1/4]**} />
https://github.com/rebassjs/grid https://github.com/rebassjs/grid
Any thoughts? 有什么想法吗?
In my thinking, you want to use the styling is react-app. 在我的想法中,你想使用样式是react-app。
if you want make the other styles.css, you have to make it first, and then import the style. 如果你想制作其他styles.css,你必须首先制作它,然后导入样式。
For example, import ./styles.css
-> this styles.css have to same located your react App. 例如,
import ./styles.css
- >这个styles.css必须找到相应的应用程序。 if you wanna change this, you can control by use './', '../' 如果你想改变它,你可以使用'./','.. /'来控制
and then --> comes from the style.css. 然后 - >来自style.css。 When you want to add the style, you have to use the "ClassName"
如果要添加样式,则必须使用“ClassName”
The other ways find this~! 其他方式找到这个〜! react_Style ways
react_Style方式
Have a good day~! 祝你有美好的一天〜!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.