New to SSR and Nextjs. #15726
Unanswered
juanUrdaneta
asked this question in
Help
Replies: 1 comment 1 reply
-
Hi. I'm no expert, but this is what I think.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm new to SSR and I wanted to learn Nextjs so I decided to use the pokeapi to make a simple pokedex that works this way:
The app works by me making a request to the pokeapi each time the users search for a pokemon, I have zero data stored on the app. All the data needed for the details is fetched on the first search
Two issues I have encountered that I have not been able to sort reading the docs:
I'm not entirely sure how to pass the already fetched pokemon data that is already on the search result (index) page to the dynamic route page for previewing the detailed information. I can pass a couple of query parameters but I'm not sure how to get the entire object to the detailes page.
Before making this work I noticed that the page with the search result is not cached so each time I go back from the details page (the one that I mentioned above that is currently empty) the search page is empty again as if I haven't search anything.
I'm sorry if I'm too much of a noob but I'd like to ask: What am I missing here? What should I be looking into?
Beta Was this translation helpful? Give feedback.
All reactions