Skip to content
Discussion options

You must be logged in to vote

you have a very simple problem: your id is once a number, and once a string. your find function does:

find((s) => s.id === id)

which doesn't find anything. It's a number in the cache, but a string when it comes from the url. TypeScript can help here ;)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@sidv93
Comment options

Comment options

You must be logged in to vote
1 reply
@sidv93
Comment options

Answer selected by sidv93
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