Are there any downsides to this sort of thing:
render() {
return (
<div className={"the-page"}>
<div className="left-col">
{this.renderLeftColumnBoringStuff()}
</div>
<div className="main-panel">
<ExitingPanel stuff={this.state.stuff_that_changes}/>
</div>
</div> )};
renderLeftBoringStuff = () => (
<div className="left-column">
button className="btn s primary" onClick={this.setExploreMode}>
{_("Explore")}
</button>
(etc ... more of these)
</div>
);
The motivation is that the structure of the page is clear in this layout, and the boring stuff doesn't need a functional component, it has no props, doesn't need to be re-rendered - it's just buttons and static layout that can be described separately.
I'm doing it, and I'm asking myself "why aren't you making this a pure component?", and I'm answering "because even that seems heavy weight to just refactor some boring definitional stuff".
The twist is that the boring stuff has references to functions on the current component, which are called when the buttons in there are pressed, so it is non-trivial to pass those into a subcomponent.
From comments below, I think the question can also be viewed this way:
How is it different to either in-line, factor out in a function or factor out in a component? I think I understand that if there are props and state involved, then a separate component can render independently, which can be a good thing. That leaves me with the question of "what if there aren't?"
(This question is about whether there are technical downsides that I may not appreciate when forming an opinion about this, not searching for opinions themselves.)