boilerplate-react-component-description
npm install -S @feizheng/boilerplate-react-component
npm update @feizheng/boilerplate-react-component
property | type | default | description |
---|---|---|---|
className | String | - | - |
value | - | - | - |
onChange | - | - | - |
- import css
@import "~@feizheng/boilerplate-react-component/dist/style.scss";
// customize your styles:
$boilerplate-react-component-options: ()
- import js
import React from 'react';
import ReactDOM from 'react-dom';
import BoilerplateReactComponent from '@feizheng/boilerplate-react-component';
// your app:
class App extends React.Component{
render(){
return (
<BoilerplateReactComponent />
)
}
}
// render to dom:
ReactDOM.render(<App/>, document.getElementById('app'));
- https://www.robinwieruch.de/minimal-react-webpack-babel-setup/
- https://www.valentinog.com/blog/react-webpack-babel/
- https://jestjs.io/docs/en/tutorial-react#snapshot-testing-with-mocks-enzyme-and-react-16
- https://testing-library.com/docs/react-testing-library/api
- Add: semver number for every build files.
- Add: need output css files.
- Add: PWA support for docs.
- Add: source.map file for dist(
you can upload for production debug
). - BUG: npm run dev will clean dist.