Next.js Discord

Discord Forum

How to implement the data display without react-query.

Unanswered
Californian posted this in #help-forum
Open in Discord
CalifornianOP
I gonna updateUser without react-query, and use refetchQueries with apollo-client.
My code likes this:
const onhandleUpdate =() =>{
updateUser({
variables :{
name:name,
email:email,
password:password,
updateUserId:user.id,
},
refetchQueries: [GET_ALL_USERS, "Users"],
}),
router.push("/")
}

If I must display the result after update user, I must use router.push...
But this way is very bad.
Any other possible way?
Pls help me resolve this.

0 Replies