Sigo
Sigo
TtRPC
Created by Sigo on 9/5/2024 in #❓-help
TextDecoder not implemented Trpc react-native httpBatchStreamLink
currently try
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions"

const applyGlobalPolyfills = () => {
const { TextEncoder, TextDecoder } = require("text-encoding")

polyfillGlobal("TextEncoder", () => TextEncoder)
polyfillGlobal("TextDecoder", () => TextDecoder)
}

export default applyGlobalPolyfills
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions"

const applyGlobalPolyfills = () => {
const { TextEncoder, TextDecoder } = require("text-encoding")

polyfillGlobal("TextEncoder", () => TextEncoder)
polyfillGlobal("TextDecoder", () => TextDecoder)
}

export default applyGlobalPolyfills
in my_layout.tsx
// calling this
applyGlobalPolyfills()
// calling this
applyGlobalPolyfills()
and ran expo run:ios but still getting same error
3 replies
TtRPC
Created by Sigo on 8/10/2024 in #❓-help
ERROR TypeError: queryClient.getMutationDefaults is not a function (it is undefined)
I found out the solution was a mismatch incase anyone is facing the issue.
3 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
thanks
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
i will try that
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
same thing also happening
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
No description
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
@BeastFox
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
this is how am making the query
const user = useAppUser();

const [activitity, setActivity] = useState();
const [skip, setSkip] = useState(0);
const limit = 20;
const today = new Date();

const {
data: challenges,
isLoading,
refetch,
isRefetching
} = api.challenges.list.useQuery(
user ? {
limit: 50,
skip,
id: user.id,
startDate: today,
...(activitity ? { activities: [activitity] } : {})
} : null, // Only make the request if user is available
{ enabled: !!user, trpc: { abortOnUnmount: true, }} // Ensure the query is enabled only when user is available
);
const user = useAppUser();

const [activitity, setActivity] = useState();
const [skip, setSkip] = useState(0);
const limit = 20;
const today = new Date();

const {
data: challenges,
isLoading,
refetch,
isRefetching
} = api.challenges.list.useQuery(
user ? {
limit: 50,
skip,
id: user.id,
startDate: today,
...(activitity ? { activities: [activitity] } : {})
} : null, // Only make the request if user is available
{ enabled: !!user, trpc: { abortOnUnmount: true, }} // Ensure the query is enabled only when user is available
);
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
test
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
I turned off retries but still getting same issues
14 replies
TtRPC
Created by Sigo on 8/8/2024 in #❓-help
I commented my query out, but i still notice request are still been made. this is what my code look
It trys to make request to the query which i already commented out and it keeps retrying. i think it has to do with caching of request i guess
14 replies
TtRPC
Created by Sigo on 4/10/2024 in #❓-help
TRPCClientError: Unable to transform response from server
Getting this error on all my request
4 replies