Open
Description
example:
import React from 'react';
class Display extends React.Component {
render() {
return (
<div className="component-display">
<div>
{this.props.value}
</div>
</div>
);
}
}
Display.propTypes = {
value: React.PropTypes.string,
};
export default Display;
propTypes can be used to make 2 thinks in react:
- events in vue
- props in vue
we can determine this based on value of property if its React.PropTypes.func
than this is an $emit
Metadata
Assignees
Labels
No labels