There seems to be nothing wrong with this code in the child component. The placeholder should show up just fine, as you implemented it.
Here is how I have it set in the parent:
import React, { Component } from 'react';
import Title from'./Title';
import TestList from'./TestList';
export default class Layout extends Component {
constructor() {
super();
this.state = {
title: 'Moving Focus with arrow keys.',
placeholder:'Search for something...'
};
}
render() {
return (
<div >
<Title title={ this.state.title } />
<p>{ this.getVal() }</p>
<TestList placeholderText={this.state.placeholder} />
</div>
);
}
}
Here is how I display it in the child:
import React, { Component } from 'react';
export default class TestInput extends Component {
constructor(props){
super(props);
};
render() {
return (
<div>
<input type="search" placeholder={this.props.placeholderText} />
);
}
}
}
Bit of a late reply but hope it helps! :-)