This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-11
Channels
- # announcements (2)
- # beginners (30)
- # biff (6)
- # calva (4)
- # cider (4)
- # clj-yaml (3)
- # clojure (14)
- # clojure-europe (43)
- # clojure-nl (8)
- # clojure-norway (34)
- # clojure-uk (2)
- # clojurescript (11)
- # clr (2)
- # conjure (3)
- # cursive (1)
- # datomic (18)
- # helix (1)
- # humbleui (6)
- # hyperfiddle (110)
- # java (25)
- # kaocha (2)
- # lsp (29)
- # missionary (7)
- # off-topic (9)
- # pathom (106)
- # polylith (27)
- # rdf (12)
- # re-frame (9)
- # releases (4)
- # spacemacs (2)
- # tools-build (4)
- # tools-deps (6)
Hey!
I have a question related to redirecting the browser to a url outside my application. This will happen through a dispatch function. The function is called :route-changed
the handler when equal to :aporte-no-ppi
and :saiba-mais
will redirect. The default is to use the inside router of the SPA.
How would :http/redirect
look like? I don't know how to write a function to redirect to external urls.
(rf/reg-event-fx
:route-changed
(fn [{nav :db} [_ {:keys [handler route-params]}]]
(let [nav (assoc nav :pagina-ativa handler)]
(case handler
:aporte-no-ppi {:db (assoc nav :pagina-ativa handler)
:dispatch [:http/redirect :aporte-no-ppi]}
:saiba-mais {:db (assoc nav :pagina-ativa handler)
:dispatch [:http/redirect :saiba-mais]}
{:db (assoc nav :pagina-ativa handler)}))))
When i load reframe10x i get a number of warnings that i assume happen because my version of reagent isn't matching what reframe wants.
Warnings in Library Code:
Wrong number of args (2) passed to reagent.impl.component/get-wrapper
Use of undeclared Var reagent.impl.component/component-name
Wrong number of args (2) passed to reagent.impl.component/do-render
Wrong number of args (2) passed to reagent.impl.component/do-render
Use of undeclared Var reagent.impl.component/component-name
Use of undeclared Var reagent.impl.component/component-name
What would you do to solve this?
• update reagent - risk, lots of things in the app might break
• fix blah bc that's the real problem...
• use a different version of re-frame10x
• don't use re-frame 10x bc blahpotentially relevant SO https://github.com/day8/re-frame-10x/issues/269
looks like i can update my apps reagent or drop down to 10x version 0.7. that's what ill do for now... to the past....
Hey, it would help to know what versions of 10x and reagent you tried. Do you think the https://github.com/day8/re-frame-10x#compatibility-matrix is still accurate?
I'll take a look. Thanks!