This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-19
Channels
- # announcements (2)
- # beginners (448)
- # calva (10)
- # cider (27)
- # clojure (121)
- # clojure-argentina (2)
- # clojure-brasil (6)
- # clojure-chicago (1)
- # clojure-colombia (9)
- # clojure-ecuador (1)
- # clojure-europe (1)
- # clojure-italy (14)
- # clojure-mexico (1)
- # clojure-nl (19)
- # clojure-spec (11)
- # clojure-uk (160)
- # clojurescript (25)
- # core-async (7)
- # cursive (8)
- # data-science (1)
- # datascript (1)
- # datomic (4)
- # devops (2)
- # graalvm (3)
- # hoplon (1)
- # immutant (1)
- # jackdaw (32)
- # jobs (2)
- # joker (2)
- # keechma (9)
- # leiningen (26)
- # luminus (13)
- # off-topic (2)
- # overtone (2)
- # quil (5)
- # reagent (38)
- # reitit (13)
- # shadow-cljs (16)
- # spacemacs (2)
- # tools-deps (4)
- # xtdb (12)
hey guys, howto handle authenticated pages with reitit ?
@abdullahibra One example here: https://github.com/metosin/reitit/blob/master/examples/frontend-auth/src/frontend/core.cljs
Example defaults to pages requiring authentication, with metadata declaring page as public. But with similar approach one can use metadata to declare e.g. required roles for a route.
guys how can i add dispatch events to be run after the refreshing the page?
You can use controllers for this; in this case start
controller is run when you enter the route with the controller
https://metosin.github.io/reitit/frontend/controllers.html
For example:
:controllers [{:start #(rf/dispatch [::events/reset-widget-list])}]
perfect! , thanks
refreshing works perfectly, but i need to run some events after the refresh page done
is there reitit capabilities for handling this ?
also what is the difference between push-state and replace-state ?
push state adds to the history, replace state swaps the old one out
A more accurate explanation: https://developer.mozilla.org/en-US/docs/Web/API/History_API
Thank you 🙂