Fork me on GitHub
#re-frame
<
2018-10-14
>
heyarne09:10:58

any recommendation for handling global keyboard events in a re-frame app? is https://github.com/gadfly361/re-pressed the way to go? i'm worried about pulling in all of jquery for cross-browser compatibility, isn't this why google closure library is bundled with cljs? plus tree-shaking with google closure is easier i assume...

Bravi10:10:14

how do you guys usually structure your re-frame apps may I ask?

Bravi10:10:14

the way I usually do it is how it’s described in re-frame docs under larger apps

frenata14:10:35

@bravilogy I've generally followed that advice IIRC, starting with a flat directory structure with a single events, subs, and views and splitting those into separate directory structures when complexity/size warrants it. I'm interested in exploring the alternative touched on in https://purelyfunctional.tv/guide/database-structure-in-re-frame/ though, which is to have domain oriented namespaces, with events and subs (and views?) bundled together. Maybe on my next project. 🙂

andrea.crotti14:10:34

I split by domains and use namespaced keywords for everything

andrea.crotti14:10:07

So you can always easily see where an event is defined

frenata14:10:48

oh definitely namespaced keywords, that's a huge win for someone else reading the codebase

joelsanchez15:10:25

events, subs and views bundled together + namespaced keywords works for me