Skip to content
Discussion options

You must be logged in to vote

hmm, I think calling loginMFAChallenge.loginUser, which calls a hook under the hood would violate the rules-of-hooks because hooks have to start with use.... So i think purely from a react-hooks perspective, you can't have classes that export hooks.

generally, there weren't really any changes in this regard between v3 and v4. It looks more like you're maybe having two different versions of react-query so the react context is not picked up? Like maybe your npm package has v4 but the consumer still has v3? does your package have react-query as a peerDependency?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@luis-cicada
Comment options

@luis-cicada
Comment options

Answer selected by luis-cicada
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants