Skip to content
Discussion options

You must be logged in to vote

I think useMutation in an effect seems the right choice. With useQuery, you should be ready that this fires quite often - for example, when the user loses their internet connection and then reconnects. If your query performs effects on the server, this is not a good idea. Also, you’ve said that your post request doesn’t return anything, so i assume it stores something on the printer? Or even prints a page :)
Anyways, those are all side effects, so useMutation sounds good to me.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@andrewslock
Comment options

@TkDodo
Comment options

Answer selected by andrewslock
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants