That creates a new Panelelement, but doesn't redefine the Panel function (the component definition). The problem in the linked Reddit post is that defines its component, Modal, in the hook itself.
If you did this, your hook would need to accept any children of the panel, but wouldn't need to export panelProps. So it may or may not be syntactic a win. But it should perform the same, right?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you could safely:
That creates a new
Panel
element, but doesn't redefine thePanel
function (the component definition). The problem in the linked Reddit post is that defines its component,Modal
, in the hook itself.If you did this, your hook would need to accept any children of the panel, but wouldn't need to export
panelProps
. So it may or may not be syntactic a win. But it should perform the same, right?