是否有任何可行的方法来循环遍历下面的类而不是逐个进行。像罐头一样,A,B,C的映射方式使得它们返回如下相同的语句......?
//individual similar classes
var A = React.createClass({ ... });
var B = React.createClass({ ... });
var C = React.createClass({ ... });
var D = React.createClass({ ... });
//class that executes all these classes through map and return something along these lines
[A,B,C,D] => [React.createClass({ ... }),React.createClass({ ... }),React.createClass({ ... }),React.createClass({ ... })]