Skip to content

Nested query params #19

Open
Open
@rrrnld

Description

@rrrnld

Hi!

I have a question about how to best approach this; I'm basically trying to encode redirection data into a route. I thought it would go like this:

;; construct the login route and try to reconstruct the original data
(r/resolve router ::login {} {:redirect [::artist-view {:id 1}]})
;; => "/?redirect=artist-view&redirect=%7B%3Aid%201%7D"
(r/match router *1)
;; => [:user/login nil {:redirect ["artist-view" "{:id 1}"]}]

As you can see the structure of the vector gets destroyed. Can I hook into the encoding somehow? Is there a better approach that I'm not seeing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions