Long chains of object calls should be assigned to a variable or destructured if used multiple times.
The following pattern is considered a warning:
render() {
return (<div className={this.props.className}>
<p>{this.props.text}</p>
<div>)
}
The following patterns are not considered warnings:
render() {
const { className, text } = this.props;
return (<div className={className}>
<p>{text}</p>
<div>)
}
render() {
const props = this.props;
return (<div className={props.className}>
<p>{props.text}</p>
<div>)
}