DEV Community

Discussion on: New React Hooks Pattern? Return a Component

Collapse
devinrhode2 profile image
Devin Rhode

I guess doing <Panel {...panelProps} or {renderPanel({ props... is the way to go. One major drawback with returning a variety of components from a hook, is that you lose out on tree shaking.