Closed Cap32 closed 9 years ago
If a production code is used, it is recommended that you do not include the styleguide
field. for example, as follows:
components/button
├─ index.js
└─ styleguide.js
index.js
import React from 'react';
export default class Button extends React.Component {
render () {
return (
<button className='button'>
{this.props.children}
</button>
);
}
}
styleguide.js
import React from 'react'
import Button from './'
export default class extends React.Component {
static styleguide = {
category: 'Examples',
title: 'Button'
}
render () {
return (
<Button>Button</Button>
)
}
}
It will include only styleguide.js
.
rsg 'components/**/styleguide.js'
Thank you! 😄
The
styleguide
field may contain some big data, but that is useless on production environment.