This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-13
Channels
- # adventofcode (84)
- # aleph (1)
- # announcements (2)
- # aws (27)
- # beginners (52)
- # braveandtrue (2)
- # calva (440)
- # cider (7)
- # clara (2)
- # cljdoc (26)
- # cljs-dev (70)
- # clojure (131)
- # clojure-berlin (4)
- # clojure-brasil (1)
- # clojure-europe (2)
- # clojure-greece (4)
- # clojure-hamburg (1)
- # clojure-italy (4)
- # clojure-losangeles (6)
- # clojure-nl (14)
- # clojure-spec (7)
- # clojure-uk (25)
- # clojurescript (26)
- # component (2)
- # cursive (13)
- # datomic (60)
- # dirac (59)
- # docker (1)
- # figwheel (1)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (5)
- # juxt (33)
- # leiningen (19)
- # nrepl (1)
- # off-topic (37)
- # protorepl (2)
- # re-frame (18)
- # reagent (46)
- # remote-jobs (1)
- # ring-swagger (1)
- # shadow-cljs (88)
- # sql (10)
- # tools-deps (64)
- # vim (24)
Anyone looked at react hooks at all? They sound interesting - a way of using react state without classes
Yup, and you might find interesting conversations re: that nearer its launch date on the slack logs. @U4YGF4NGM has a POC (or better) implemented, IIRC
oo cool thanks
hx sounds interesting, is this your lib?
I’ve been building a cute little app and it seems to work very well! but it still feels very early days
if you decide to try it, feel free to ping me in #clojurescript or directly, or open up issues and whatnot on github!
I like the sound of getting quite close to react itself
react seems incredibly well engineered, it seems that sometimes the abstraction layers can get a bit clunky
I'm pretty bedded in with re-frame now though, but I'll bear it in mind if I have something small to try
indeed. the original impetus for the library was because I wanted to use apollo-client and a bunch of other more complex React libraries
suspense is the async rendering stuff?
nice!
we use re-frame at work as well and I really like it. I’m considering how to interop with stock re-frame, or fork it for use with raw React
actually, in my original Hooks POC someone opened a pull request with a re-frame hook: https://github.com/Lokeh/hooks-demo/blob/master/src/hooks_demo.cljs#L47
ooh interesting
https://github.com/Lokeh/hooks-demo/blob/master/src/hooks_demo/hooks.cljs#L38
the source for the <-sub
hook is 13 lines 😛
In a reagent component, How do you highlight the text (select the text) of a newly created instance of a
{:type "text}
. (sorry no js background..)
I manage to create on-click events to add more instances of my div, and I can focus on the text field, but I want it selected.. for convenience of course.@adamgefen https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select is where that highlighting comes from
thanks @mikerod . Just getting my head round the js interop..
there isn’t a direct React/Reagent prop to set (or even an html element attribute) to do the selection that I am aware of - or see online
which during an event handler like :on-focus
will be the event object’s, e
above, target
Applied! Thanks again.
@adamgefen within your initial code fragment, I noticed you used autoFocus
. Please see https://github.com/reagent-project/reagent/blob/master/doc/FAQ/MyAttributesAreMissing.md
Yes, I see that. Thanks!
I was looking at https://github.com/lambdaisland/kanban/blob/ep-10-reagent-cursors/src/cljs/kanban/core.cljs
In the above code the Card function uses :autoFocus
, I assume that it is an inconsistency that I just still don't understand.