I have a link shortener, and the structure is like so:
When I shorten a link by clicking the button in
ShortenLinkForm , I want to add that link, with it’s short form (returned by API) to a
previousLinks array which is passed as a prop to
But, the only way I know how to do it is by adding a global “link” object, and setting it’s value to
response.data from my axios call.
How can I set a local variable’s value to what’s returned by my API or VueX action?