Browse Source

Update typechecking-with-proptypes.md Babel plugin-transform-class-properties (#3825)

main
LeoTM 3 years ago
committed by GitHub
parent
commit
9c2b800f73
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/typechecking-with-proptypes.md

2
content/docs/typechecking-with-proptypes.md

@ -179,7 +179,7 @@ ReactDOM.render(
);
```
If you are using a Babel transform like [transform-class-properties](https://babeljs.io/docs/plugins/transform-class-properties/) , you can also declare `defaultProps` as static property within a React component class. This syntax has not yet been finalized though and will require a compilation step to work within a browser. For more information, see the [class fields proposal](https://github.com/tc39/proposal-class-fields).
If you are using a Babel transform like [plugin-proposal-class-properties](https://babeljs.io/docs/en/babel-plugin-proposal-class-properties/) (previously _plugin-transform-class-properties_), you can also declare `defaultProps` as static property within a React component class. This syntax has not yet been finalized though and will require a compilation step to work within a browser. For more information, see the [class fields proposal](https://github.com/tc39/proposal-class-fields).
```javascript
class Greeting extends React.Component {

Loading…
Cancel
Save