a response from an API before loading another page where I want to use that response?
Please how can I use the API response in the next page I navigate to?
Well, are you using react or what?
Vanilla JavaScript
Must I use local storage?
And why are you not fetching this data in the other page?
Due to how the project is, I fetch it in the first page and display in next page. I didn't want to fetch it twice
Local storage then
It will depends of what kind of data is he fetching
Alright thanks, 👍
Whatever kind of data he's fetching can be stored. It just may need some processing or transformation based on the data type
Please I JavaScript to navigate to that 2nd page. Is this okay or is there some way the form would have handled it?
You aren't giving anywhere near enough information for us to give you an answer
Yeah save in LS and then retrieve on the other page
https://stackoverflow.com/help/how-to-ask
Обсуждают сегодня