Skip to content

How to use hooks in non-component functions. #2948

Answered by ealmloff
onweru asked this question in Q&A
Discussion options

You must be logged in to vote

You can either use hooks directly in components or in other hooks. It looks like auth_action is a hook? If it is, you just need to add the use_ prefix (use_auth_action) to make it clear that it needs to be called like a hook. DX check should pass once you add the prefix

See also: https://dioxuslabs.com/learn/0.5/cookbook/state/custom_hooks

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by onweru
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