This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-05
Channels
- # beginners (240)
- # boot (5)
- # cider (48)
- # clara (2)
- # cljs-dev (3)
- # cljsrn (66)
- # clojure (111)
- # clojure-denver (2)
- # clojure-italy (42)
- # clojure-nl (5)
- # clojure-spec (12)
- # clojure-uk (45)
- # clojurescript (138)
- # community-development (7)
- # core-async (8)
- # datomic (27)
- # emacs (21)
- # euroclojure (6)
- # figwheel (10)
- # fulcro (29)
- # graphql (5)
- # hoplon (3)
- # luminus (1)
- # lumo (7)
- # mount (4)
- # off-topic (13)
- # onyx (20)
- # parinfer (3)
- # pedestal (4)
- # precept (1)
- # proton (3)
- # re-frame (41)
- # reagent (3)
- # reitit (28)
- # ring-swagger (7)
- # shadow-cljs (88)
- # specter (1)
- # testing (10)
- # tools-deps (27)
- # vim (58)
When using input-signals in re-frame, would you intentionally nest grouped data in app-db in order to improve the efficiency of subscriptions?
re-frame-10x 0.3.1 is out: https://github.com/Day8/re-frame-10x/releases/tag/0.3.1
There's a demo site coming up soon to let you explore it on your own too
Here's the demo site, so you can start playing around with it https://jacekschae.github.io/conduit-re-frame-10x-demo/
man this is an awesome bit of kit. that new source tracing thing is going to be killer
When we get it working on your project!
It’s from cljs 1.10
I made a PR to cljs-devtools, will be fixed in next release
Cljs 1.10 adds a MapEntry type which is rendered in full there
@danielcompton I see, thanks!
Hi! Where can i find some info about current best practices for running more than 1 re-frame app in the same context? ie: I have a live editor that runs on re-frame and i am writing guides to re-frame in the live editor Is name-spacing events and subscriptions and the data in the db itself the best approach? are there any interceptors/middleware that simplify this? tx
i recently skirted around this when i tried to devcards my re-frame app. i gave up, because re-frame is really designed as a singleton. namespaced keys are likely your best bet, @fj.abanses. happily, that approach gives you a lot of other goodness, the least of which is the greater likelihood that you’ll use spec for your app db 🙂
can you point me to any examples for specing out app db? i'd like to learn how to do that
@matthewdaniel probably not the most clear example, but I do so here: https://github.com/Reefersleep/sleepydo/blob/master/src/sleepydo/rewrap.cljs
I use the event registering wrapper at the bottom of that file instead of the vanilla one to ensure that I hit my interceptors for all events
This is conventional re-frame btw, straight from an example in the docs somewhere
Look here for the specs: https://github.com/Reefersleep/sleepydo/blob/master/src/sleepydo/db.cljs
App-state is the relevant one
@robert-stuttaford ha ha 🙂 thanks!! i have another app that uses fact-ui as the db with re-frame and i made fx/cofx that inject the db around like re-posh does with the datascript db .. and works great...as far as i am aware... I may give something like that a try... and spec it too 🙂
re-frame-10x tracing - when i switch it on, i get Error compiling debux/common/util.cljc
error. pretty sure i’m doing things as i should be. @danielcompton / @mikethompson? https://github.com/robert-stuttaford/bridge/tree/1219d9c7eb56ce06bd67050f2cd3a83da796f9ab
@darwin @jacek.schae Awesome! I think the live demo is great advertising for both re-frame and re-frame-10x 🙂
@fj.abanses a few years back I wrote https://github.com/binaryage/pure-frame, but didn’t get back to it to update it to match latest and greatest re-frame, your best bet is to use different iframes to host independent re-frame instances I guess
@robert-stuttaford that looks a lot like one of the messages I was seeing when I first tried adding the 10x tracing. I don't know the exact root cause, but it disappeared somewhere along the route of upgrading pretty much everything in my project.clj to the latest versions. Are you using lein? if so lein ancient
is your friend.
edit: hmm, I see your setup and the important things are all bang up to date. Only obvious difference to my now working setup is I'm on react 15 and 10x 0.3.0.
@darwin i found that in my research 🙂 thanks for the status update on it. I am having a go at name-spacing data/evts/subs and then injecting the ns at some point so i dont have to pass it around.. will be good enough for my use case i think... will report back
@soulflyer yes, thanks - that was the first thing i checked 🙂 i used https://github.com/Olical/depot to check
@matthewdaniel what does your ns form look like?
@danielcompton this is what you mean right?
Yeah change that refer to refer-macros
Also, is that :refer shown in the docs somewhere? It should be changed
Thanks, fixed
hello peeps - I am trying to set the cursor position in a textarea after an update from the server. I was thinking I could set the property selectionStart
from a subscription but I can’t find a way to set it… is it possible?
You might need to move to a form-3 component which gives you more control over the rendering lifecycle
We did something kinda similar in re-frame-10x: https://github.com/Day8/re-frame-10x/blob/4ade29cb9ee5f97f8221cbca76bbbfd4c963b0b9/src/day8/re_frame_10x/view/event.cljs#L136-L145
Although we weren't trying to change the scroll position in response to updates, just preserve it across re-renders