diff --git a/e2e/react-start/basic-auth/src/components/Login.tsx b/e2e/react-start/basic-auth/src/components/Login.tsx index b6b6da0c37f..9d10ea37373 100644 --- a/e2e/react-start/basic-auth/src/components/Login.tsx +++ b/e2e/react-start/basic-auth/src/components/Login.tsx @@ -38,10 +38,10 @@ export function Login() { }) }} afterSubmit={ - loginMutation.data ? ( + loginMutation.stateData ? ( <> -
{loginMutation.data.message}
- {loginMutation.data.userNotFound ? ( +
{loginMutation.stateData.message}
+ {loginMutation.stateData.userNotFound ? (
- {updateInvoiceMutation.variables?.id === invoice.id ? ( + {updateInvoiceMutation.stateVariables?.id === invoice.id ? (
{updateInvoiceMutation.status === 'success' ? (
diff --git a/examples/react/kitchen-sink/src/main.tsx b/examples/react/kitchen-sink/src/main.tsx index ce7687c6669..5c4ba33dc86 100644 --- a/examples/react/kitchen-sink/src/main.tsx +++ b/examples/react/kitchen-sink/src/main.tsx @@ -446,7 +446,7 @@ function InvoiceComponent() { Save
- {updateInvoiceMutation.variables?.id === invoice.id ? ( + {updateInvoiceMutation.stateVariables?.id === invoice.id ? (
{updateInvoiceMutation.status === 'success' ? (
diff --git a/examples/react/kitchen-sink/src/useMutation.tsx b/examples/react/kitchen-sink/src/useMutation.tsx index 1ff7a4653bd..2a15b88260d 100644 --- a/examples/react/kitchen-sink/src/useMutation.tsx +++ b/examples/react/kitchen-sink/src/useMutation.tsx @@ -5,9 +5,9 @@ export function useMutation(opts: { onSuccess?: (ctx: { data: TData }) => void | Promise }) { const [submittedAt, setSubmittedAt] = React.useState() - const [variables, setVariables] = React.useState() + const [stateVariables, setVariables] = React.useState() const [error, setError] = React.useState() - const [data, setData] = React.useState() + const [stateData, setData] = React.useState() const [status, setStatus] = React.useState< 'idle' | 'pending' | 'success' | 'error' >('idle') @@ -35,10 +35,10 @@ export function useMutation(opts: { return { status, - variables, + stateVariables, submittedAt, mutate, error, - data, + stateData, } } diff --git a/examples/react/start-basic-auth/src/components/Login.tsx b/examples/react/start-basic-auth/src/components/Login.tsx index b6b6da0c37f..9d10ea37373 100644 --- a/examples/react/start-basic-auth/src/components/Login.tsx +++ b/examples/react/start-basic-auth/src/components/Login.tsx @@ -38,10 +38,10 @@ export function Login() { }) }} afterSubmit={ - loginMutation.data ? ( + loginMutation.stateData ? ( <> -
{loginMutation.data.message}
- {loginMutation.data.userNotFound ? ( +
{loginMutation.stateData.message}
+ {loginMutation.stateData.userNotFound ? (
- {updateInvoiceMutation.variables()?.id === invoice()?.id ? ( + {updateInvoiceMutation.signalVariables()?.id === invoice()?.id ? (
{updateInvoiceMutation.status() === 'success' ? (
diff --git a/examples/solid/kitchen-sink/src/useMutation.tsx b/examples/solid/kitchen-sink/src/useMutation.tsx index 077b7167793..f32293c53c0 100644 --- a/examples/solid/kitchen-sink/src/useMutation.tsx +++ b/examples/solid/kitchen-sink/src/useMutation.tsx @@ -5,9 +5,9 @@ export function useMutation(opts: { onSuccess?: (ctx: { data: TData }) => void | Promise }) { const [submittedAt, setSubmittedAt] = createSignal() - const [variables, setVariables] = createSignal() + const [signalVariables, setVariables] = createSignal() const [error, setError] = createSignal() - const [data, setData] = createSignal() + const [signalData, setData] = createSignal() const [status, setStatus] = createSignal< 'idle' | 'pending' | 'success' | 'error' >('idle') @@ -35,7 +35,7 @@ export function useMutation(opts: { return status() }, get variables() { - return variables() + return signalVariables() }, get submittedAt() { return submittedAt() @@ -45,7 +45,7 @@ export function useMutation(opts: { return error() }, get data() { - return data() + return signalData() }, } } diff --git a/examples/solid/start-basic-auth/src/components/Login.tsx b/examples/solid/start-basic-auth/src/components/Login.tsx index ae2b270393a..4b29cb2cb86 100644 --- a/examples/solid/start-basic-auth/src/components/Login.tsx +++ b/examples/solid/start-basic-auth/src/components/Login.tsx @@ -38,10 +38,10 @@ export function Login() { }) }} afterSubmit={ - loginMutation.data() ? ( + loginMutation.signalData() ? ( <> -
{loginMutation.data()?.message}
- {loginMutation.data()?.userNotFound ? ( +
{loginMutation.signalData()?.message}
+ {loginMutation.signalData()?.userNotFound ? (