glamor
glamor是一款css-in-js的插件
github地址:https://github.com/threepointone/glamor
Installation
npm install glamor --save
Usage
我所用到的是将style对象转化为类名字符串形式的部分:
import React from 'react';
import {
css} from 'glamor';
export default class Demo extends React.Component{
constructor(props){
super(props);
this.state