Fork me on GitHub
#re-frame
<
2015-11-03
>
richiardiandrea00:11:00

it looks like it works 😄

Pablo Fernandez09:11:14

How can I get ahold of the current app state to inspect it? Maybe from figwheel?

mitchelkuijpers09:11:03

re-frame.db/app-db

mitchelkuijpers09:11:11

From the top of my head

mikethompson12:11:40

@pupeno: This question has come up a couple of times. So I've written an FAQ entry: https://github.com/Day8/re-frame/wiki/FAQ#5-how-can-i-inspect-app-db

jstew14:11:55

reagent-forms doesn't work well with re-frame, from what I can intuit (too much local state). Anyone have any alternatives that they enjoy?

mccraigmccraig14:11:04

iirc didn't @pupeno do something with re-frame & forms ?

richiardiandrea16:11:20

When I create a h-box with children (button) in re-com, is rerendering handled like in re-frame, so that if the global ratom changes a condition for one button only, only that button changes?

kevink17:11:32

Hi, I'm new to ClojureScript, but I was able to get re-frame, Cursive, and figwheel all running without too much fuss. Great job!

kevink17:11:49

However, now that I've got a small app running, I'm curious how one would create a larger app that consists of separable/independent "modules" that live in different ClojureScript projects. For example, imagine a dashboard type SPA app that should work if either add-on A, add-on B, or both were deployed on the server. Both may contribute views or components or something to the larger app. Does that make sense?

jstew18:11:41

@kevink: This, along with some local config about which modules are installed might help: https://github.com/Day8/re-frame/wiki/A-Larger-App

kevink18:11:14

@jstew: yep, I’ve seen that but it is really about a single ClojureScript project still, right? I guess I’m looking for advice on splitting an app into different compilation units

hkjels19:11:16

@kevink: You could have separate projects for each panel if you’d like if that’s what your thinking of?

kevink19:11:40

@hkjels: yes, something like that. My concern is how to do that with an outer app frame that includes these separate panels while the Google Closure compiler expects to compile the whole world together at once.

hkjels19:11:43

clojure compiler simply removes dead-code, so you wouldn’t include those core.cljs files from the different panels

kevink20:11:44

@snoe: yep, however the cljs modules are still within a single project.clj. that might be good enough for me

kevink20:11:37

in general, can anyone recommend any large-ish apps on github or elsewhere using re-frame that i can peek at?

mangr3n21:11:15

has anyone built a re-frame SPA and mixed it into a J2EE webapp? I'm trying to think through solving a build/deploy scenario that's manageable with a minimum of effort. My two options seem to be 1. Build manually and deploy into an exploded war. (By build manually I mean, during the cloud deployment of an instance of the app, explode the war, checkout the re-frame project, build the artifacts and manually copy them into the proper location in my web application.), OR... 2. Somehow integrate the lein tool into the maven build process (yuck or not?) I've tested the manual copy on my local machine, and my development process uses nginx to proxy the figwheel instance into my running app (awesome-sauce)

mangr3n21:11:39

And the goal is to completely replace the old j2ee app frontend with the re-frame SPA

gregg22:11:52

@richiardiandrea: I don't feel I understand your question fully. Can you expand a bit, or do you have a sample of code you can share? Rendering is done by Reagent so there's no difference between re-frame and re-com. If you change a ratom, then all components that depend on that ratom will be re-rendered. So in your case, if your button is the only button dependent on that ratom then yes, it's the only one that will change.

richiardiandrea22:11:42

@gregg: definitely, my question was based on wrong assumptions...for instance, of course if I deref my atom in each disabled? of a button, they will all three re-rendered...I thought I could optimized with a local raton in a reaction, but no, it is not an optimization

mikethompson22:11:57

Message for re-com users. Try doing this: (set! re-com.box/debug true) That adds coloured borders around all v-box, h-box, gap etc. Can be useful.