class CyInfo extends Component {
foo(){
console.log(this.props.id);
return getAttributes(this.props.id)
}
render() {
return ( <Info data = {this.foo()}> </Info>)
}
}
this parent receives "props.id" and passes the data to these children, which getAttributes () returns.
export default class Info extends Component {
constructor(props){
super(props)
}
render() {
console.log(this.props.data);
return (
<div id="info">{this.props.data}</div>
)
}
}
In the child I can see the value of props on the console and in the component WillReceiveProps as well. But the array is not rendering. I am trying to use response-devtool. In the details of response-devtool, the children seem to go through, but not rendering. Interestingly, in response-devtool, when I change some array of array elements, rendering is done.
What did I do wrong.
EDIT: [React-Devtool Screenshot] [1]
I edited the reaction-devtool screenshot. Details look, but the component only gives the initial value. In the screenshot, the console error is an icon that simply ignores this
EDIT2: Console prints an array of details
3:
JSON.stringify(this.props.data)