1import TitleLine from '../components/title-line'
2import '../assets/style/components/_line.scss'
3function Line(props) {
4 console.log('ropiedades: ', props);
5 return (
6 <div>
7 <TitleLine header={props}/>
8 </div>
9 );
10}
11
12export default Line;
1/* PASSING THE PROPS to the 'Greeting' component */
2const expression = 'Happy';
3<Greeting statement='Hello' expression={expression}/> // statement and expression are the props (ie. arguments) we are passing to Greeting component
4
5/* USING THE PROPS in the child component */
6class Greeting extends Component {
7 render() {
8 return <h1>{this.props.statement} I am feeling {this.props.expression} today!</h1>;
9 }
10}
1<input
2 type= "text"
3 value={ this.state.value || "" }
4 placeholder="Enter Name"
5/>
1<Route exact path="/details/:id" render={(props) => <DetailsPage globalStore={globalStore} {...props} /> } />
2