TanStackT
TanStack3y ago
2 replies
verbal-lime

How to pass multiple variables using loaders with router?

Looking at this example
getContext: ({ params: { postId } }) => {
    return {
      loaderOptions: createLoaderOptions({
        key: 'post',
        variables: postId,
      }),
    }
  },

Why variables is in plural but accept only one string? what if I want tp pass search params?
Was this page helpful?