Fork me on GitHub
#re-frame
<
2016-07-11
>
mikethompson02:07:57

@naomarik: The Wiki page should be editable. Happy for you to add whatever clarification you see as necessary.

naomarik02:07:34

thanks @mikethompson, added my addition 🙂

naomarik03:07:46

just wondering -- is it common practice to go around editing github wiki pages without permission?

escherize03:07:14

> Dear Reader: Do not edit this page without first consulting an experienced member of the ClojureScript community.

mikethompson03:07:03

@naod: I always appreciate the typos and oddities getting fixed on Wiki pages I also appreciate small additions, like yours, for sure. Perhaps if someone was going to make significant changes, I'd like a heads up. But generally, for me, the more brains on something the better.

mikethompson03:07:49

That's kinda the reason for open source

mikethompson03:07:15

Open source can be a thankless slog, so having others contribute is actually what you want

naomarik03:07:31

yup, I'm a newcomer to contributions so don't really know what unspoken etiquette there might be

naomarik03:07:02

re-frame docs have been immensely useful to me btw since i started reagent

danielcompton03:07:41

@naomarik: I’d assume a wiki page is fair game for small fixes unless it explicitly calls out no editing. If people really don’t want others editing stuff they will put it in a docs/ folder on the repo

naomarik03:07:56

makes sense

escherize04:07:13

Are there any big open source re-frame apps?

escherize05:07:49

Looking at https://github.com/Day8/re-frame/wiki/A-Larger-App is useful but doesn't give me a ton of examples.

[UNUSED ACCOUNT]05:07:27

I’ll be releasing one shortly. Not that big (1.5KLOC including backend), but nontrivial

escherize06:07:16

Is there any interest / prior work in porting re-frame to cljc?

escherize06:07:30

I have done some, but is there anyone else doing this?

escherize06:07:18

Also, Why use

(register-sub :foo (fn [db] (reaction (:foo @db)))
instead of
(defn foo [db] (reaction (:foo @db)))
? [4:34] then use (foo re-frame.db/app-db) instead of (subscribe [:foo])

mikethompson06:07:03

I'm glad these questions are getting asked now with v0.8.0 close: You want to use the new de-duplication feature? You want to want to use the new "pure function" version of subscriptions?

escherize06:07:27

sorry what is the de-duplication feature?

escherize07:07:25

One thing I want to do is

(let [setup (do (dispatch-sync [:init-db])
                (dispatch [:name "John"])
                (dispatch [:login]))]
  (is (= true @(subscribe [:logged-in?]))))

escherize07:07:41

and other such things.

martinklepsch09:07:51

I read a bit of the code in this repo over the weekend and the event abstractions seem pretty nice. Maybe something to look at for re-frame's new effects stuff: https://github.com/uxbox/uxbox/blob/master/src/uxbox/util/rstore.cljs

limist19:07:16

When using re-frame, suppose one has a form with one or more hidden inputs that should have a default value, for a new user (or on initial render of the form). What would be a good approach for setting the default in the app db in such a case? Thanks for any suggestions...

martinklepsch19:07:30

@limist: I would usually just put in a dispatch before the hiccup

martinklepsch19:07:57

this means it's sent every time the component re-renders but often this isn't an issue (esp. when inputs are hidden)