Skip to content

Instantly share code, notes, and snippets.

@atkinchris
Created August 10, 2020 15:40
Show Gist options
  • Save atkinchris/ab926d28bf590f150f53cba730e0acc2 to your computer and use it in GitHub Desktop.
Save atkinchris/ab926d28bf590f150f53cba730e0acc2 to your computer and use it in GitHub Desktop.
Tree shaking - good examples
export { default as MyFirstComponent } from './MyFirstComponent'
export { default as MySecondComponent } from './MySecondComponent'
var MyFirstComponent = function MyFirstComponent(props) {
return /*#__PURE__*/React.createElement("div", props);
};
MyFirstComponent.propTypes = {
children: PropTypes.node,
className: PropTypes.string
};
MyFirstComponent.defaultProps = {
children: undefined,
className: undefined
};
export default MyFirstComponent
var MySecondComponent = function MySecondComponent(props) {
return /*#__PURE__*/React.createElement("div", props);
};
MySecondComponent.propTypes = {
children: PropTypes.node,
className: PropTypes.string
};
MySecondComponent.defaultProps = {
children: undefined,
className: undefined
};
export default MySecondComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment