Created
August 10, 2020 15:40
-
-
Save atkinchris/ab926d28bf590f150f53cba730e0acc2 to your computer and use it in GitHub Desktop.
Tree shaking - good examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export { default as MyFirstComponent } from './MyFirstComponent' | |
export { default as MySecondComponent } from './MySecondComponent' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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