Releases: oliviertassinari/babel-plugin-transform-react-remove-prop-types
Releases · oliviertassinari/babel-plugin-transform-react-remove-prop-types
v0.4.4
Fixes / Enhancements
- fix(flow): support tricky use case with flow and the wrap mode (#105)
// In
type Props = {
bar?: string,
};
function MyComponent(props: Props) {
return <div {...props} />;
}
// Babel Transformations
[
'babel-plugin-flow-react-proptypes',
'babel-plugin-transform-flow-strip-types',
'babel-plugin-transform-react-remove-prop-types',
]
// Out
function MyComponent(props) {
return React.createElement('div', props);
}
MyComponent.propTypes = process.env.NODE_ENV !== 'production' ? {
bar: require('prop-types').string
} : {};
v0.4.3
Fixes / Enhancements
- Add support for removal comment annotations (#103) @EnoahNetzach
- Add additionalLibraries option (#102) @EnoahNetzach
v0.4.2
v0.4.1
v0.4.0
Breaking changes
- feat(react): support create-react-class over createClass (#93)
Dropped the support ofReact.createClass
for the newcreate-react-class
package.
Notice that we rely on thecreateReactClass()
function name to remove the prop types.
Fixes / Enhancements
v0.3.3
v0.3.2
v0.3.1
v0.3.0
Breaking changes
- Throw when accessing the propTypes from an imported module (#79)
That pattern has proven to be dangerous. It's now documented.