1
我試圖用這個寶石:使用npm
陣營組件進口不承認
npm install react-component-gallery
http://kyleamathews.github.io/react-component-gallery/
所以我安裝了它,我創造了這樣一個陣營組成:
var Gallery = React.createClass({
render: function() {
return (
<ComponentGallery
className="example"
margin=10
noMarginBottomOnLastRow=true
widthHeightRatio=3/5
targetWidth=250>
<img src="https://example.com/pic1.jpg" />
<img src="https://example.com/pic2.jpg" />
<img src="https://example.com/pic3.jpg" />
<img src="https://example.com/pic4.jpg" />
<img src="https://example.com/pic5.jpg" />
<img src="https://example.com/pic6.jpg" />
<img src="https://storage.googleapis.com/relaterocket-logos/[email protected]" />
<img src="https://storage.googleapis.com/relaterocket-logos/[email protected]" />
</ComponentGallery>
);
}
});
但是我收到此錯誤:
JSX value should be either an expression or a quoted JSX t
ext (10:11)
其中第10行是這樣的:
margin=10
爲什麼會發生這種情況?