Phoenix Storybook - can't make hooks work

Hi all,

I am trying to make hooks work in Phoenix Storybook, whithout much luck.

I am following the guide at: Sandboxing components — phoenix_storybook v0.5.1
The error I am getting is the exact same you can see here (in the browser console): Phenix Storybook - Dropdown

unknown hook found for "DropdownHook"...

Any idea on how to solve?

Thank you

1 Like

This is a bug, sorry about that.

The custom storybook.js declaring your hooks is loaded with defer and is sometimes loaded after the main JS file initializing the LiveSocket.

I’ll get it fixed today

Got it fixed on the main branch. Let me know if this is ok for you

1 Like

No need to be sorry!

I confirm it is working now.

(Whoa that was quick)

1 Like