DEV Community

Discussion on: React: Create component inside a component (?)

Collapse
 
sharukhhope profile image
Sharukh babu

You can actually call your functional component within another functional component using {Users()} just like how you would in a class component.
It won't bother your renders as it is not being called as a react component.

Collapse
 
rsweetland profile image
Reilly Sweetland

Thanks to your comment, I found a case within a class component where caused a rerender, but {Users()} did not. Thanks for sharing.