Seeking JavaScript Logic Assistance
I could use some guidance on implementing JavaScript logic, specifically with Vue Router. I don't necessarily need the answer handed to me, just a nudge in the right direction (and apologies if my question is not quite clear).
The Challenge
So far, I've been successfully making API requests using Axios with a JWT token in the headers. However, I now face the task of capturing the search parameters entered by the user in the browser's URL. The goal is for users to be able to share a link with coworkers that leads to the same page with identical options and triggers the API request with those query params.
Main areas of uncertainty:
- A. What is the optimal method for making an API request upon route loading (with URL query params)? Note that the page route does not directly align with the API endpoint URL.
- B. How can I extract user input/selections into the browser's URL?
- C. Will I need to adjust my route objects for proper navigation even with the presence of a query string?
Potential Solution Approach
Please note that I am looking for a frontend-focused solution within the Vue ecosystem.