JonathanJ
tRPC13mo ago
7 replies
Jonathan

Where did useUtils go?

I am working through upgrading my project and I use
useUtils
here and there to do fetches from components like ag-grid which requires a data source

It looks something like this

    const utils = useUtils();
    const dataSource = useMemo(() => {
        return {
            getRows: async (params: any) => {

                utils.contacts.grid.fetch().then((response) => {
                    params.success({
                        rowData: response.rows,
                        rowCount: response.totalCount,
                    });
                });
                
            }
        }
    }, []);


I thought it had moved to something under getting the trpc using the
useTRPC
but it doesn't seem to be there, how should I get this to work?
Was this page helpful?