What would be the right code replacing old useClientEffect$

Hello, can anyone help me with this code, it still uses useClientEffect$.

import { component$, useClientEffect$, useStore } from “@builder.io/qwik”;
import { DocumentHead, Link } from “@builder.io/qwik-city”;
import { Post } from “@prisma/client”;
import { trpc } from “~/client/trpc”;

export default component$(() => {
const store = useStore({
query: “”,
results: as Post,

useClientEffect$(async ({ track, cleanup }) => {
    const controller = new AbortController();
    cleanup(() => controller.abort());

    const query = track(store, "query");
    const posts = await trpc.posts.getPosts.query({ query }, { signal: controller.signal });
    store.results = posts;

return ( rest of code..

Can anyone change this code to be compatible with the latest version of Qwik. This code works in the old “@builder.io/qwik”: “0.9.0” version but not in recent versions. What would be the correct way to do this now? Meaning a production ready version like 1.0.0 or later.

Maby a easy question for you but i am struggling to make this work :frowning:

Hi Jules,

I saw that your inquiry is largely Qwik related. While this forum is a great resource for the Builder Visual Editor, you’ll have greater success discussing Qwik related topics with our Open Source Development Team

To reach out to the Partytown and Qwik open source project teams, please head over to our Discord and join the discussion there. For the best results, we’d recommend you make a copy of your implementation of Partytown and place it in a Stackblitz project for review, then share it with the #general-partytown channel.

You are also welcome to reach out for Partytown help by creating a discussion topic or Issue in the Github repo: https://github.com/BuilderIO/partytown/

Please don’t hesistate to reach out to support@builder.io for any Builder Visual Editor related questions.