Had to roll a custom implementation in angular js just to be sane. Not so many bells and whistles but the comfortability and simplicity it brings. Angular query and react query paradigm is super powerful. Loved the whole enterprise. Fetching data in one component in pulling the data using query keys in another family level component. Eliminating the need to manually maintain and share data since react /angular query is indirectly handling that. All you need are your queries, queries and keys to do alot with little fuss.
Loved the content! Thanks for sharing. Could you please talk more about how to use the tanstack lib with NgRx? I'm struggling trying to implement both in a project here, and would be great have some help from your experience.
Loved the video, thank you for sharing! I was wondering how would you silently trigger a re-fetch if the data becomes stale? For example, user A is viewing a list and user B has made a change. Is it possible to refresh user A's list? Is this something that would have be done with signalR? Thank you!
hi @ariefyousif521, I think you might confuse a query being "stale" with "invalidating" when it comes to the terminology. "A query becomes stale" means just the passage of time. But if you know a certain piece of data changed elsewhere (your question) then search for "invalidating the query", i.e. you invalidate some cached response and as a result it becomes stale TL;DR; take a look at 58:40 - "isn't queryClient.invalidateQueries({ queryKey: ... })" what you're asking for?
Thank for responding@@DucinDev. I probably did not word that correctly. Let me try again. Assuming we have two users on different machines that are looking at the same grid. If user A adjusts the grid by deleting a record, is it possible for the change to reflect for user B in real-time without them refreshing the page? It would be nice to tell the query client to invalidate the query because of the change made by user A.
@@ariefyousif521 yeah, if it's two separate machines then you need something like websockets or any other push-based notifications (signalR is one of them).
Very useful. Is there a build in way to include persistence (localstorage). Not that its hard to implement. But it would be nice to have it out of the box.
there is such plugin provided already: tanstack.com/query/v5/docs/framework/react/plugins/createSyncStoragePersister. It's labelled as react-specific, but it's not, it's core specific. Just install it and use it ;) (github.com/TanStack/query/blob/main/packages/query-sync-storage-persister/package.json - no dependency on any specific framework whatsoever).
I am confused about the paradigm of this library. But interesting concept though When do you think Angular Query is going to support RXJS out of the box? Also by any chance donyou plan on doing another video working in replacing existing Angular rxjs application code to TanStack? I think that would be really helpful in understanding Query.
Wow the forced subtitles are really annoying. Attention grabbing and sometimes obscure what is going on, especially in the vscode terminal. Please just stick to the native ones that can be toggled.
Help me a lot, thanks😁
Awsome content! We need more content with angular + tanstack
Great content ! Thks.
Had to roll a custom implementation in angular js just to be sane. Not so many bells and whistles but the comfortability and simplicity it brings. Angular query and react query paradigm is super powerful. Loved the whole enterprise.
Fetching data in one component in pulling the data using query keys in another family level component. Eliminating the need to manually maintain and share data since react /angular query is indirectly handling that. All you need are your queries, queries and keys to do alot with little fuss.
exactly 💪
Repo/codebase available here: github.com/ducin/angular-query-getting-started
Loved the content! Thanks for sharing. Could you please talk more about how to use the tanstack lib with NgRx? I'm struggling trying to implement both in a project here, and would be great have some help from your experience.
Loved the video, thank you for sharing! I was wondering how would you silently trigger a re-fetch if the data becomes stale? For example, user A is viewing a list and user B has made a change. Is it possible to refresh user A's list? Is this something that would have be done with signalR? Thank you!
hi @ariefyousif521, I think you might confuse a query being "stale" with "invalidating" when it comes to the terminology. "A query becomes stale" means just the passage of time. But if you know a certain piece of data changed elsewhere (your question) then search for "invalidating the query", i.e. you invalidate some cached response and as a result it becomes stale
TL;DR; take a look at 58:40 - "isn't queryClient.invalidateQueries({ queryKey: ... })" what you're asking for?
Thank for responding@@DucinDev. I probably did not word that correctly. Let me try again. Assuming we have two users on different machines that are looking at the same grid. If user A adjusts the grid by deleting a record, is it possible for the change to reflect for user B in real-time without them refreshing the page? It would be nice to tell the query client to invalidate the query because of the change made by user A.
@@ariefyousif521 yeah, if it's two separate machines then you need something like websockets or any other push-based notifications (signalR is one of them).
Very useful. Is there a build in way to include persistence (localstorage). Not that its hard to implement. But it would be nice to have it out of the box.
there is such plugin provided already: tanstack.com/query/v5/docs/framework/react/plugins/createSyncStoragePersister. It's labelled as react-specific, but it's not, it's core specific. Just install it and use it ;)
(github.com/TanStack/query/blob/main/packages/query-sync-storage-persister/package.json - no dependency on any specific framework whatsoever).
I am confused about the paradigm of this library. But interesting concept though
When do you think Angular Query is going to support RXJS out of the box?
Also by any chance donyou plan on doing another video working in replacing existing Angular rxjs application code to TanStack? I think that would be really helpful in understanding Query.
Wow the forced subtitles are really annoying. Attention grabbing and sometimes obscure what is going on, especially in the vscode terminal. Please just stick to the native ones that can be toggled.
Thanks for the feedback. Will take this into account in the future 👍
"Angular query - getting started" is 1.40h long.... I quit and stick wth the old way
yeah..this stuff is becoming a full time job...
Angular developers are coming out of the http cave! Ugha-ugha... Lolz from React dev... 😂
Yeah go back using effects or something lol