I encounted a issue with React Invalid hook call error when using this module inside a library module which is linked into another project via npm link and I think the way this module interacts with react-dom is the root cause which leads to two instances of react to be loaded in such scenarios. Also see this related StackOverflow answer.
I will try to provide a minimal reproduction, but ultimately i think this module needs to provide a <Toaster>-like component that the user can insert into the component tree somewhere to remove the react-dom dependency, maybe optionally.