Browse Source

Update typechecking-with-proptypes.md

add 'javascript' after ```
main
kinyaying 7 years ago
committed by GitHub
parent
commit
bf28861146
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      content/docs/typechecking-with-proptypes.md

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

@ -147,7 +147,7 @@ MyComponent.propTypes = {
You can define default values for your `props` by assigning to the special `defaultProps` property: You can define default values for your `props` by assigning to the special `defaultProps` property:
``` ```javascript
const defaultProps = { const defaultProps = {
name: 'Stranger' name: 'Stranger'
}; };
@ -172,7 +172,7 @@ ReactDOM.render(
You can also put propTypes and defaultProps as static props inside React class. You can also put propTypes and defaultProps as static props inside React class.
``` ```javascript
class Greeting extends Component { class Greeting extends Component {
static defaultProps = { static defaultProps = {

Loading…
Cancel
Save