How to implement the data display without react-query.
Unanswered
Californian posted this in #help-forum
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.
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.