-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalidateQuery()
-helper
#118
Conversation
This pull request is being automatically deployed with Vercel (learn more). www – ./www🔍 Inspect: https://vercel.com/trpc/www/EGohBqfeow8jjuD6Dw4ccb1FYjQF chat – ./examples/next-ssg-chat🔍 Inspect: https://vercel.com/trpc/chat/DM1FKoCkvPMcdr1g88fYcesdh3r6 hello-world – ./examples/next-hello-world🔍 Inspect: https://vercel.com/trpc/hello-world/5t6HrNPquif4DMY2TQE3AUXuiLCr |
Codecov Report
@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 95.63% 95.66% +0.02%
==========================================
Files 13 13
Lines 481 484 +3
Branches 71 73 +2
==========================================
+ Hits 460 463 +3
Misses 21 21
Continue to review full report at Codecov.
|
- [React-specific helpers (`@trpc/react`)](#react-specific-helpers-trpcreact) | ||
- [`useInfiniteQuery()`](#useinfinitequery) | ||
- [`invalidateQuery()`](#invalidatequery) | ||
- [`ssr()`: Server-side rendering (SSR / SSG)](#ssr-server-side-rendering-ssr--ssg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on moving this all under a React-specific section, but ssr().createCaller() is not react specific. Then again, I'd just do router.createCaller outside react. Maybe just add that somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ssr()
is from @trpc/react
trpc.invalidateQuery([path, input])
in a type-safe way