I want to create a component to be used across a lot of lists.
Here's the code sandbox
Basically I have a lot of lists, and on top of each list I want to have a toolbar of actions. I call it ListActions. Each ListActions can contain multiple ListAction button in it.
And I want my component to be flexible, so that developers can provide sinle action JSX, multiple actions JXS or a react component that returns single or multiple actions.
It works great on development. But when I build it, without getting any warnings related to hooks I see this error:
Uncaught Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
And when I follow the links (here and here) I see that there are a couple of rules related to the hooks. But I don't find any breaching of those rules in my code.
How can I fix this?