This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-24
Channels
- # announcements (3)
- # beginners (128)
- # boot (2)
- # braveandtrue (97)
- # calva (13)
- # cider (4)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (78)
- # clojure-germany (8)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (59)
- # clojure-uk (29)
- # clojurescript (46)
- # core-async (9)
- # cursive (63)
- # data-science (3)
- # datomic (22)
- # devcards (1)
- # duct (7)
- # emacs (4)
- # flambo (2)
- # fulcro (37)
- # instaparse (6)
- # jobs-discuss (38)
- # juxt (1)
- # off-topic (35)
- # om-next (1)
- # parinfer (7)
- # re-frame (14)
- # reagent (6)
- # reitit (21)
- # rum (1)
- # shadow-cljs (74)
- # spacemacs (8)
- # specter (1)
- # sql (3)
- # testing (2)
- # unrepl (2)
- # yada (6)
I'm tryuing to call map-component
as a child of another but it won't render I assume it needs a r/render
but I don't have a DOM node to put it in so I don't want to r/render
. Ideas on how I can get around this?
(require ["react-leaflet" :refer (Map Marker Popup TileLayer)])
(defn map-component
[]
[:> Map {:center [51.505, -0.09]
:zoom 13}
[:> TileLayer {:url url-template
:attribution attribution
:accessToken token
:id <>}]
[:> Marker {:position [51.505, -0.09]}
[:> Popup "some text"]]])
does anyone have a suggestion on a reagent library to use to create a sticky header?
simialr to react-sticky https://www.npmjs.com/package/react-sticky which I'm having trouble getting into my project
thanks
@thurmondmb I use react-sticky itself and like it a lot. I go the cljsjs route
1) add [cljsjs/react-sticky "6.0.2-0"]
to your project.clj dependencies
2) require [cljsjs.react-sticky]
in your namespace
Then
(def sticky-container (reagent/adapt-react-class (aget js/ReactSticky "StickyContainer")))
(def sticky (reagent/adapt-react-class (aget js/ReactSticky "Sticky")))
(And yes, I am still one of the sinners that uses aget instead of goog.object/get 😆 )