This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # arachne (6)
- # aws-lambda (3)
- # beginners (14)
- # boot (56)
- # cider (8)
- # cljs-dev (5)
- # cljsrn (11)
- # clojure (240)
- # clojure-dusseldorf (3)
- # clojure-greece (165)
- # clojure-italy (5)
- # clojure-romania (1)
- # clojure-russia (24)
- # clojure-uk (30)
- # clojure-ukraine (3)
- # clojurescript (29)
- # core-async (6)
- # css (1)
- # cursive (25)
- # datascript (6)
- # datomic (61)
- # dirac (1)
- # events (3)
- # hoplon (1)
- # instaparse (3)
- # jobs (4)
- # juxt (28)
- # lein-figwheel (7)
- # leiningen (19)
- # luminus (1)
- # lumo (2)
- # nyc (1)
- # off-topic (19)
- # om (25)
- # onyx (4)
- # parinfer (2)
- # pedestal (23)
- # perun (20)
- # re-frame (44)
- # reagent (20)
- # remote-jobs (3)
- # ring (3)
- # ring-swagger (5)
- # rum (12)
- # slack-help (3)
- # spacemacs (25)
- # specter (62)
- # sql (16)
- # unrepl (313)
- # yada (4)
@sandbags yes cache scares me every time during development, will be glad to hear feedback for 0.4.4
@andre yeah i'm never quite sure why the cache holds on to things sometimes and not others
Hi guys, here's the thing that bothers me a lot (I'm a cljs newbie). If I'll start a re-frame project, I would need a datagrid mostly. I mean, a list component with sorting, filtering, column resizing, infinite scrolling, pagination, exporting to CSV etc. stuff. I'm coming from Angular, where there is brilliant ui-grid http://ui-grid.info/ that covers all this kind of stuff, while being stateful, mutative, and certainly not FP-oriented. I've found a close alternative in the React world: AG Grid, https://www.ag-grid.com/, which is really powerful and free. Can I use it with re-frame, regarding it's FP ideas?... And, what datagrids are you using? And maybe there are some examples of datagrid-apps built with re-frame?
i've not got around to using it myself yet so i am not sure how good it is or how it might compare to existing solutions
in general you can use stateful JS components in re-frame by wrapping them, that's in the docs ... if you can't find it i can dig up a reference
(essentially you create a reagent component that wraps the JS component and acts as the conduit between a re-frame subscription and JS land)
@sandbags Thanks! >you can use stateful JS components in re-frame by wrapping them that's what I wanted to hear 🙂 I'm still in progress of reading the docs, so I'll get there soon.
@markel i had some links open in my browser https://github.com/kishanov/re-frame-datatable https://github.com/Day8/re-frame/blob/master/docs/Using-Stateful-JS-Components.md
I've found the Google Maps example, in practice, a little hard to translate into my own context. I think because it's a little more complicated and I'm not sure how to simplify, although conceptually the process seems simple enough. I suspect I just need to find an hour to play with it properly.
(also I am essentially ignorant of the React underpinnings beyond the minimum required to use reagent/re-frame at all)
@markel this presentation may be useful ... it discusses visualized grids and introduces some React components for that: https://bvaughn.github.io/forward-js-2017/#/0/0 (it gets interesting from https://bvaughn.github.io/forward-js-2017/#/10/0) React components are usable from Reagent, sometimes easily, sometimes with more fiddle (because of clj <-> js data transforms)
As an example of React component interop, here is a recent example of using Chartjs https://clojurians.slack.com/archives/re-frame/p1489452021791396 Warning: the amount of chat history kept by slack is short, so that example code will disappear within a day or two.
Stupid question. Is a
re-com/h-box supposed to be used with only box elements? Is it still correct if I were to use
re-com/label for example, as the child?
@petr: It's been a while, but I'm pretty sure that
h-box expects children that are styled correctly to be used in flexbox - so they might work directly depending on their style, but if they don't then you can wrap them in
box and they should be good. I'm pretty sure I've always just wrapped elements in
box to make sure I didn't miss any edge cases.
They do work directly without the box. I was just unsure of which would be the cleaner way
I'm having trouble getting a couple of the attributes outlined here to work: http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/h-box
:gap for example. For the life of me I cannot get there to be a space between teh boxes
@isak my guess is ... you'll be wanting to do this (dispatch in subscription) because a newly-shown view/panel needs some data.
@mikethompson I see. The problem i'm trying to solve is recomputing one part of state if some other parts change. I saw the on-change interceptor, but that introduces 2 problems. 1) Need to intercept quite a few places, but not all 2) Didn't see how I could debounce the computation. Any suggestions?
So the first response is to say: do the dispatch in the event handler which changes X
So then the design shifts to ... you can put an interceptor on "those many handlers which change X"
You may also want to look at: https://github.com/Day8/re-frame/issues/255#issuecomment-274303581
If there was a way to write a subscription that was debounced, that would make it so I could use subscriptions instead of manipulating app state
It seems like it would also be better than hunting down and maintaining interceptor for 10+ events
The solution in that comment I don't think would solve my problem, because aren't the computations immediate?
Not re-frame specific, but reagent question here. I’ve noticed that sometimes such definitions makes huge difference:
specifically one with partial does not work properly (something like double rendering) is there any explanation/documentation for that?
(defn concrete-container-1 [view-component] [generic-container :some-param-1 :some-param-2 view-component]) (def concrete-container-1 (partial generic-container :some-param-1 :some-param-2))