This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-27
Channels
- # announcements (47)
- # babashka (36)
- # beginners (7)
- # biff (34)
- # calva (9)
- # cider (5)
- # clj-http (13)
- # clj-kondo (24)
- # cljs-dev (9)
- # clojure (146)
- # clojure-austin (1)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (2)
- # clojurescript (4)
- # clr (1)
- # core-async (9)
- # cursive (11)
- # datomic (6)
- # emacs (17)
- # events (3)
- # fulcro (45)
- # graphql (7)
- # helix (1)
- # hyperfiddle (28)
- # java (1)
- # london-clojurians (1)
- # lsp (75)
- # malli (1)
- # membrane (35)
- # reitit (6)
- # releases (1)
- # shadow-cljs (48)
- # tools-build (5)
- # tools-deps (27)
fyi: Small electric clojure program to display the unix "fortune" into a web page. https://gist.github.com/bherrmann7/765f4074dfac013527402fa7f4016ee5 This electric clojure is very very cool.
All – help Electric by sending me your demos if you haven't already! I am writing a launch recap blog post. If you don't have a video, tell us what you're working on, here in this thread or by DM!
Heads up: in master we just landed a changeset that stabilizes uncommon shadow-cljs hot code reloading problems. Also it makes #?(:cljs (:require-macros user.demo-1-hello-world))
no longer needed, you don't have to remember to put it at the top of your files anymore. We think the changeset is stable, would love if more people tested it this week and if you have any hot code reloading issues please tell us!
What kind of analytics are you thinking? Performance? Usage? Workflow?
Is there a gist/doc somewhere that shows how to use history and routing with a little more detail? I am currently using an atom, a watch and a condp
to handle routing within the app. Now I would like to store some state in the url so I can support reloading/bookmarking and also get browser back/forward working. I could not figure out how it works from going through the examples in src-dev
the hyperfiddle.history module has those features but is highly experimental
are you looking for a straightforward html5 history integration?
> are you looking for a straightforward html5 history integration? Yes nothing complicated just browser back/forward working. My current implementation is,
(e/def !route #?(:cljs (atom ::patients)))
(e/def route (e/watch !route))
;; then in main view
(condp = route
::patients (Patients.)
::add-patient (AddPatient.)
(NotFound.))
also is there a built in mechanism to set/get URL params so I can keep/retrieve additional information about the route within the URL or should I resort to js.Try this: https://github.com/hyperfiddle/electric/blob/master/src/contrib/electric_goog_history.cljc
This has not been tested recently, there may be typos
Also note this is not public API, we are working on refactoring our git repos so this file may or may not move, just a heads up
You can definitely use it
Hey @U5H4U2HEH did you get it working?
@U09K620SG I got working a while ago I was gonna post a gist for others but it slipped my mind. Had to modify things a little from the example to get it work but it works as expected.
Would love to see the gist, will turn it into a tutorial
Feel free to PR to the main repo if you want the github contributor badge
(e/client (dom/div (dom/text "foo"))) ;; works
#_(e/server
(e/client (dom/div (dom/text "foo")))) ;; breaks
commit 9be03dd66f012971716544aa56c197bf5d0a85b2 (HEAD) Author: Dustin Getz <<mailto:[email protected]|[email protected]>> Date: Thu Feb 23 14:15:51 2023 -0500 electric: efficient clocks moved to core
that should not be needed
I confirm it should not be needed. Looking into it