This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-21
Channels
- # adventofcode (8)
- # announcements (20)
- # babashka (43)
- # beginners (8)
- # biff (12)
- # calva (2)
- # cider (5)
- # clerk (6)
- # clj-commons (12)
- # clj-kondo (16)
- # clojure (20)
- # clojure-denver (1)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (105)
- # clojure-uk (2)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # datomic (2)
- # hyperfiddle (13)
- # jackdaw (1)
- # jobs (4)
- # jobs-discuss (4)
- # lsp (2)
- # malli (12)
- # pathom (2)
- # pedestal (1)
- # re-frame (22)
- # shadow-cljs (37)
- # squint (28)
- # xtdb (28)
- # yamlscript (4)
Hello! I'm currently working with the history router and was wondering if there's a way to configure it to open links in a new tab, similar to the "_blank" attribute in traditional anchor tags. Is this functionality supported, and if so, could you provide a code snippet to help me better understand how to implement it?
Should do the trick:
(history/link <target route>
(dom/props {:target "_blank"})
(dom/text "Click me"))
In the context of the history router, if I'm using the history/navigate! function with a route like
(history/navigate! history/!history [:app.poms-00-main/entity-info-page [company-name "company"]])
how would I open in a new page?An history instance is local to a tab.
For now, if you want to open a new tab programmatically:
• get the link from the route with: (history/encode (history/build-route !history <route>))
• pass it to https://developer.mozilla.org/en-US/docs/Web/API/Window/open
Usage example:
(.open js/window (history/encode (history/build-route !history [:app/targetkw [param1 param2]])) "_blank")
It's working.New easier, self-contained way to get started and experiment with Electric: https://github.com/hyperfiddle/electric-fiddle
hi, I've ran through the instructions in README and spotted couple typos - https://github.com/hyperfiddle/electric-fiddle/compare/main...vollcheck:electric-fiddle:main
otherwise great repo and happy to play around with it, I appreciate that every new iteration brings more "hygiene" to the table
thanks @U03N5HN4K1N - So that you get credit for the contribution, can you create a PR and comment on the PR that you release this into the public domain? (We still have to select a license for this repo)
Is this a replacement for https://github.com/hyperfiddle/electric-starter-app or does it serve a different purpose?
Yes that is the intent though we haven't made a final decision about what to do about that repo