bokuweb / re-bulma

[Deprecated] 💎Bulma components for React
http://bokuweb.github.io/re-bulma/
MIT License
364 stars 66 forks source link

The react in es6 defines the defaultProps error in the component. #95

Open huangjihua opened 6 years ago

huangjihua commented 6 years ago

taxError: /Users/huangjihua/Documents/autohome/projects/re-bulma/src/components/panel/panel-tabs.js: Unexpected token (6:19 `export default class PanelTabs extends Component {

6 | static propTypes = { | ^ 7 | children: PropTypes.any, 8 | className: PropTypes.string, 9 | style: PropTypes.object, ` Defining the static property is not es6, and in the es7 draft, install the babel-preset-stage-0 and try again after the babelrc reference, but not yet.

davidnguyen11 commented 6 years ago

I solved by below steps: replace .babelrc content with this content

{
  "presets": ["react", "es2015", "stage-1"]
}

run commands below:

yarn run build
yarn run styleguide-server