Skip to content
Discussion options

You must be logged in to vote

It works! Thanks.

For other ppl's reference, see code below.

I do still have doubts on ensuring the immediate parent match is the exact route we want (e.g. posts/). It'd be nice to have explicit function like getRouteApi(path: string) . But its return is only useful under React context provider in component layer at the moment.

commit 541e18a04663cb350ed96eb6f74b420f3a2197a6 (HEAD -> master)

    feat: demo use cache across routes & endpoints
    
    Skip fetching single-post when data is already cached from post-list page

diff --git a/src/routes/posts.$postId.tsx b/src/routes/posts.$postId.tsx
index 0290114..f658f17 100644
--- a/src/routes/posts.$postId.tsx
+++ b/src/routes/posts.$post…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ivawzh
Comment options

@schiller-manuel
Comment options

@ivawzh
Comment options

Answer selected by ivawzh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants