Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import PropTypes from 'prop-types';
- class Foo extends Component {
- static displayName = 'Foo';
- static propTypes = { bar: PropTypes.string };
- static defaultProps = { bar: 'Bar' };
- state = { saludo: 'Hola' };
- render() {
- return this.state.saludo + this.props.bar;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement