redux-toolkit
redux-toolkit copied to clipboard
isSuccess value turning true while status: "pending"
Why isSucces turning into true while status "pending"
I try to fetching a query using RTK method POST and I console the response like below:
useEffect(() => { console.log(responseCheckPromoCode.isError, responseCheckPromoCode.isSuccess, responseCheckPromoCode.status); } ,[responseCheckPromoCode]
after running the project responseCheckPromoCode rendered 3 times like below:
any answer and suggestions would be appreciated, Thanks.
If you provide a minimal repro or a replay I can take a look.
If you provide a minimal repro or a replay I can take a look.
i can't give the repo but if you mind maybe i can give the slice of code.