You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a tabbed UI, where I have a need for some top-level query params as well as a 'subquery' to represent state within each tab. I am currently updating the route query with a stringified JSON object to achieve that subquery. For example, my route query might look something like: ?foo=bar&tab={"idx":0,"state":{"page":1}}
Vue Router doesn't complain about this approach and I haven't run into any problems, but I'm wondering if there's anything I'm overlooking?
I have attempted to encode the stringified JSON, but that creates problems attempting to decode the query later (the encoded string is essentially encoded twice due to Vue Router's encoding)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on a tabbed UI, where I have a need for some top-level query params as well as a 'subquery' to represent state within each tab. I am currently updating the route query with a stringified JSON object to achieve that subquery. For example, my route query might look something like:
?foo=bar&tab={"idx":0,"state":{"page":1}}
Vue Router doesn't complain about this approach and I haven't run into any problems, but I'm wondering if there's anything I'm overlooking?
I have attempted to encode the stringified JSON, but that creates problems attempting to decode the query later (the encoded string is essentially encoded twice due to Vue Router's encoding)
Beta Was this translation helpful? Give feedback.
All reactions