onSuccess, onError and onSettled deprecated next major version?

with
onSuccess
,
onError
and
onSettled
being deprecated soon™️, what would the best practice be for triggering side effects, when a trpc call is successful?

i should clarify, i'm not talking about putting the returned data in state. i'm talking about refreshing a route in a
"use client"
component with
next/router
, or toggling a boolean in a jotai store.
image.png
Solution
Why good API design matters, even if it means breaking existing APIs in the face of resistance.
Was this page helpful?