Enable javascript in your browser for better experience. Need to know to enable it? Go here.
Published : Nov 20, 2019
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar. Understand more
Nov 2019
Trial ?

使用带标签的模板文字styled components,可以将为React组件设置样式所需的CSS直接放入创建该组件的JavaScript代码中。这大大减轻了管理CSS的痛苦,并且不需要为避免CSS中的命名冲突而想尽办法,比如命名约定等。开发人员在查看组件定义时可以直接看到样式,而不必记住几MB的CSS样式。当然,将CSS放入JavaScript代码中,可能会使跨不同组件样式的一致性变得更加困难,因此我们建议使用这种方法时一定要理解其优缺点。

Download the PDF

 

 

 

English | Português 

Sign up for the Technology Radar newsletter

 

 

Subscribe now

Visit our archive to read previous volumes