This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-23
Channels
- # aws-lambda (1)
- # beginners (11)
- # boot (456)
- # cider (3)
- # cljsrn (7)
- # clojure (340)
- # clojure-berlin (6)
- # clojure-dev (207)
- # clojure-germany (12)
- # clojure-greece (3)
- # clojure-italy (3)
- # clojure-russia (12)
- # clojure-spec (42)
- # clojure-uk (29)
- # clojured (7)
- # clojurescript (125)
- # datascript (1)
- # datomic (47)
- # defnpodcast (4)
- # emacs (30)
- # events (7)
- # hoplon (13)
- # instaparse (64)
- # jobs (13)
- # jobs-discuss (1)
- # lein-figwheel (1)
- # leiningen (10)
- # luminus (1)
- # lumo (14)
- # off-topic (10)
- # om (16)
- # om-next (3)
- # onyx (1)
- # pedestal (3)
- # protorepl (5)
- # re-frame (17)
- # reagent (66)
- # ring (1)
- # ring-swagger (13)
- # spacemacs (12)
- # specter (4)
- # untangled (272)
- # vim (4)
- # yada (24)
Not realy sure but using it
(defn fetch
[url options & fs]
(reduce #(.then %1 %2) (js/fetch url options) fs))
Hi everyone, is there anybody who generated csrf-token in clojurescript? In SPA style
do you want to generate it on client side or you are running clojurescript on backend, like on top of node? If first, then wouldn’t it neglect the purpose of csrf if someone else would just copy that code and generate token on their own and use that for malicious purposes?
@sudodoki actually I’m new at SPA style, I use ajax to send data from client (cljs) to backend (pedestal), and I don’t have any idea on how or best practice to do it, Been googling and find : https://gist.github.com/coyotespike/aca29bdeca1eea1e8648 But that doesn’t seem to work on my machine
@dsapoetra no need to ask in every channel
is there a good summary somewhere about CSRF protection and whether it's needed in SPAs?
also, needed for GETs or POSTs only?
I feel like I have a gap in my knowledge there 😉
@pesterhazy POST, need for Login form, and sending some data to get something from DB
@pesterhazy been looking, didn’t find good example/tutorial
thanks anyway 🙂
I have some issues with React Virtualized components. Would it be appropriate to discuss them here?
I think this is a good place
I’ll just post the first issue then: https://plnkr.co/edit/TrKdNu4FfNsXqERPVnYo?p=preview The issue there is that the loading element doesn’t have the right position/style
I made JavaScript examples to discuss it with the library maintainer as he doesn’t do ClojureScript, but I think he’s in a different timezone
I’m closer to a solution. The only thing left to find out is why updateList2
doesn’t work as compared to updateList1
:
https://plnkr.co/edit/lAddN6eeT8w4PNgTcxNl?p=preview
I have found the solution, but it wasn’t obvious: https://plnkr.co/edit/lAddN6eeT8w4PNgTcxNl?p=preview
When this is rendered..
[:div {:style {:transform (str "translate(25%, 25%) scale(" 1.2 ")")}}]
I only get
translate(25%, 25%)
and the scale transform is truncated. Is there a way around this?
@rodeorockstar seems to work for me
next question.. i'm using [reagent "0.6.0" :exclusions [cljsjs/react]]
with [cljsjs/react-with-addons "15.4.2-2"]
but i'm getting the error js/ReactDOM is missing
...
a different dependency may rely on another version of react
try boot show -d
or lein deps :tree
it may give you a hint
also you could check if window.ReactDOM is available in the chrome dev tools once the page is open
if yes it's probably a order-of-execution problem
thanks for the advice (again). ReactDOM seems to be missing from the window. rolling back to a previous version of react-with-addons solves the problem for now. 🙂
When I create React elements with r/as-element
like (r/as-element [:div @state])
this won’t see new values of state?
can you show the surrounding code?
think about how it works
the fn needs that executes as-element needs to be rerun when the atom changes
why is the 2nd argument to AutoSizer a fn?
That’s the API of AutoSizer: https://github.com/bvaughn/react-virtualized/blob/master/docs/AutoSizer.md
what a weird api - a fn as a child
maybe deref the atom outside the anon fn
bind it in a let
basically just return (r/as-element [(fn [] ...)])
?
that should work as well yeah
they really should have passed the fn as a prop, not a child
react-virtualized is really high quality
doesn't mean I have to agree with every api decision though 🙂
just because React allows children to be functions doesn't mean it's a good idea
@pesterhazy Yeah, the [(fn []]
thing worked