Fork me on GitHub
#re-frame
<
2017-05-31
>
stuartmitchell02:05:44

@jfntn I couldn't replicate your problem exactly in my tests can you see if https://github.com/Day8/re-frame-test/pull/8 fixes it?

jfntn02:05:53

@stuartmitchell Thanks for looking into this. Unfortunately our project is not setup to track this dependency from source, so I can’t easily test your solution right away. I’d just like to point out that I didn’t try calling rf/dispatch but instead used the :dispatch fx similarly to what you did here: https://github.com/Day8/re-frame-test/pull/8/files#diff-c7aea391450744f10c64afb23c3f30c4R149 Curious why this ended up commented out!

stuartmitchell02:05:35

@jfntn probably fat fingers, I have fixed that now. If you can git clone git checkout pr-fix-dispatch-fx-issue lein install then build your project I was just wondering as I couldn't replicate your error exactly (I had another similar one). Probably an artefact of the strange testing a testing framework setup happening here.

jfntn02:05:41

Will do, I’ll comment in the issue

owen16:05:25

@danielgrosse I much prefer the normalized approach to rf databases

owen16:05:40

I've tried both and have pretty much fully migrated away from nesting data at this point

owen16:05:59

became an issue where nested data sets were causing re-renders of the parent and such

owen16:05:12

as well as the added complexity of knowing where in a nested tree the data is

souenzzo17:05:16

@danielgrosse in my app-db I have 2 areas: :app namespace; Where I store current page, current user, current path. 0 nested. All flat. All parameter to user "goes back to actual state" was here. :api namespace; where I store the response from server. Here have some nested and indexed data.

sandbags17:05:48

Does anyone have a lein template for an electron + figwheel + re-frame + re-com app?

sandbags17:05:17

i'm currently looking at https://github.com/Gonzih/cljs-electron and assume i can just bolt in re-frame & re-com as requires and I'm good, but not 100% sure

danielgrosse17:05:15

I now normalized the data and created a tree to save the structure. A subscription parses this tree and rebuilds the whole data for the component.

shaun-mahood18:05:53

@sandbags: If you're reasonably comfortable with adding dependencies, both re-frame and re-com are pretty straightforward to add in. re-com has some CSS requirements that you'll have to make sure of, and you'll lose the structure that you would get in the a re-frame specific template, but other that that it shouldn't be too bad.