react component parameter code example
Example 1: react js component parameters
import TitleLine from '../components/title-line'
import '../assets/style/components/_line.scss'
function Line(props) {
console.log('ropiedades: ', props);
return (
<div>
<TitleLine header={props}/>
</div>
);
}
export default Line;
Example 2: react class component
class Welcome extends React.Component {
render() {
return <h1>Bonjour, {this.props.name}</h1>;
}
}