Fork me on GitHub

Hi, this might have been asked and answered before, but my Googling led me nowhere, so here goes: Can re-frame be used for making desktop applications? Would you need something like Electron to make this happen?


I think I read somewhere that the team behind reframe do use it for desktop applications...


I'm working on a re-frame based app right now. I used descjop for the electron part and I have an example project including re-frame here if it's of any help

👍 4

How do you find the experience? Is it as nice as re-frame on a web-page?


It all seems to work fine. No real surprises. But then electron is pretty much just chrome with a new suit on....


Cool. Have you figured out how to best call the Clojure backend using this setup? Is there even a Clojure backend (I'm slightly confused by all the moving parts)? In a "conventional" web app I'd use a HTTP call to the Clojure server...


I have an entirely separate backend written as a luminus project that provides an api. There's probably a better way, but I like the separation.

👍 4

I found it annoying for overwriting reg-event or reg-sub warnings when use hot-reload. how can I get rid of it?


@doglooksgood We use this:

  {:warn (fn [& args]
             (= "re-frame: overwriting" (first args)) nil
             :else (apply js/console.log args)))})


@kenny thanks, but why not a built-in function for this. I think this is a very common issue.


There would need to be a general way to detect when a reload is happening. The latest version of shadow-cljs and figwheel provide this (I think). You're welcome to vote on the issue here:

👍 4

I'm trying to use re-frame-10x in react-native, almost everything works, the only problem is fx, app-db, subs are showing me the previous state, not current state. only trace show me all the traces. is it a bug or something I missed?


@doglooksgood are there instructions you followed to get it running that are different than ? I haven't been able to get this over the hump yet.


@doglooksgood ah, I think I might know why that would be


re-frame-10x detects the end of a render cycle by waiting for Reagent to stop rendering, or for a new event to come through, and that via a monkeypatched function in Reagent


How does React Native render? I confess I don't even know if it uses Reagent/React to render to a DOM or whether it actually renders real native Cocoa/Android elements?