DEV Community

Discussion on: React - Hooks as Optional Parameters

Collapse
 
noriller profile image
Bruno Noriller

Hey... I agree with you. But it's... something.

Also, playing around with it, and I should made this explicit, it was a little of a TIL moment.

You check the parameters of WeirdComponent, you have hook and then hook2 taking hook as an argument for it's hook.
It works in this order, but if you change the order it stops working.

And this is JS for you =D