u/HosMercury

▲ 0 r/rust

Crates discord server

There was a discord server for some crates together like sqlx and askama … etc

I was joining before But I lost it
Can’t find in google

Any help?

reddit.com
u/HosMercury — 6 days ago
▲ 3 r/react

React + AG Grid + TanStack Query: Why doesn’t query invalidation reliably update my grid?

I’m building a React CRUD app using:
• React
• AG Grid
• TanStack Query
• REST API

I’m running into an issue where TanStack Query invalidation and AG Grid don’t seem to play nicely together.

For example, I have a task grid:

ID Task Status
1 Fix login Pending
2 Add dashboard Pending
3 Deploy API Done

The grid gets its data from a TanStack Query:

useQuery({
queryKey: ['tasks', filters, pagination, sorting],
queryFn: fetchTasks,
});

Now I update task #1:

Pending → Done

The mutation succeeds, and I call:

queryClient.invalidateQueries({
queryKey: ['tasks'],
});

TanStack Query correctly invalidates/refetches the query.

But AG Grid doesn’t always reflect the updated data correctly.

Sometimes:
• the query refetches successfully, but the grid still shows Pending
• the React component receives the new data, but AG Grid appears to retain its previous row state
• I have to manually refresh/reload the grid
• calling gridApi.refreshCells() / refreshServerSide() can work, but then I’m effectively managing two different state systems
• with server-side row model, pagination/sorting/filtering makes the interaction even more complicated

So I end up with something like:

Mutation

TanStack Query invalidation

API refetch

React receives new data

AG Grid has its own row model/state

???

What I’m trying to understand is:

What is the recommended architecture for React + AG Grid + TanStack Query?

Should TanStack Query be responsible for the grid’s data, with AG Grid treated as a controlled view?

Or should AG Grid’s row model/datasource be considered the source of truth, with TanStack Query used only for mutations and individual API operations?

What’s the cleanest way to handle something as simple as:

Pending → Done

and guarantee that the corresponding AG Grid row updates after the mutation without manually forcing the grid to refresh?

I’m particularly interested in how people handle this with AG Grid Server-Side Row Model + TanStack Query, rather than just a simple client-side array.
:::

reddit.com
u/HosMercury — 7 days ago
▲ 0 r/dotnet

coming from laravel , hosting is very easy and cheap … for Aspnet i feel it’s difficult and more expensive? advices? what do you use?

reddit.com
u/HosMercury — 1 month ago