@tanstack/react-virtual not displaying my virtual list
i have an announcement page where i am fetching all the announcements from the trpc's
and i am using
i saw docs on trpc's use infinite query for implementing. link for the same - https://trpc.io/docs/v10/client/react/useInfiniteQuery
also i saw the @tanstack/react-virtual for infinite query example. link for the same - https://tanstack.com/virtual/latest/docs/framework/react/examples/infinite-scroll
and i modified them according them to my own needs
i am able to get the data successfully from the backend but it is not rendering in my app
code is below :-
Backend Code
useInfiniteQuery hookand i am using
@tanstack/react-virtual for rendering and refetching queryi saw docs on trpc's use infinite query for implementing. link for the same - https://trpc.io/docs/v10/client/react/useInfiniteQuery
also i saw the @tanstack/react-virtual for infinite query example. link for the same - https://tanstack.com/virtual/latest/docs/framework/react/examples/infinite-scroll
and i modified them according them to my own needs
i am able to get the data successfully from the backend but it is not rendering in my app
code is below :-
Backend Code
- Your procedure needs to accept a cursor input of any type (string, number, etc) to expose this hook.
An example showing how to implement Infinite Scroll in React using TanStack Virtual.