Fork me on GitHub

has somebody successfully used re-frame-10x with figwheel.main?


keep getting this in the js console

Uncaught TypeError: Cannot read property 'createElement' of undefined
    at mranderson048$reagent$v0v8v0$reagent$impl$template$reag_element (template.js:443)
    at mranderson048$reagent$v0v8v0$reagent$impl$template$vec_to_elem (template.js:597)
    at mranderson048$reagent$v0v8v0$reagent$impl$template$as_element (template.js:610)
    at f (dom.js:84)
    at mranderson048$reagent$v0v8v0$reagent$dom$render_comp (dom.js:29)
    at Function.mranderson048.reagent.v0v8v0.reagent.dom.render.cljs$core$IFn$_invoke$arity$3 (dom.js:86)
    at mranderson048$reagent$v0v8v0$reagent$dom$render (dom.js:67)
    at Function.mranderson048.reagent.v0v8v0.reagent.dom.render.cljs$core$IFn$_invoke$arity$2 (dom.js:77)
    at mranderson048$reagent$v0v8v0$reagent$dom$render (dom.js:63)
    at Function.mranderson048.reagent.v0v8v0.reagent.core.render.cljs$core$IFn$_invoke$arity$2 (core.js:169)


Open an issue if you can’t get it working

👍 4

@manutter51 reading up more on what you sent me yesterday, and found this page: This is what you were describing, right?


Alright cool, that page is making a lot of sense


I forgot to warn you: re-frame can be addictive once you get the hang of it 😄


Ha! I got my degree in mechanical engineering, so the logic and separation of components is very welcome


Especially after trying to learn javascript for some other parts of our project...


I took a stab at setting up re-frame for cljdoc: — any feedback welcome 🙂

👍 12

The configuration that could be added to re-frame to make this more first-class is here:


It’s a bit unfortunate that re-frame.core doesn’t have docstrings etc but that has been this way for a while


is the :finally option from cljs-ajax supported in re-frame-http-fx? if not directly, is there a good way to support/hack it? (i’m currently dispatching the “final” event from both the success and failure event handlers) … thanks!


What is the idiomatic way to create components. Where do you keep its subs and registered events so they are self contained? All in file?


@sveri I if you make a skeleton app from the lein template you will see what I see looking at most re-frame apps: different files for db, subs, events, views, etc. I started out trying to keep related events/subs with the components they served, but saw that they were mostly just boilerplate best hidden. I think I ended up keeping interesting sub-elements with their views and dumping the merely boiler plate in files dedicated to their category.


But I am a re-frame noob.


hey y'all


im wondering if anybody knows a way to bind a global keyboard event


like if I wanted my SPA to have arrow key support like for a game


is gadfly361/re-pressed the de-facto way? I only need a couple binds, it seems overkill


@thmorriss You can add an event listener like this and then just handle the keys that you want to for the browsers that you want to support

document.addEventListener('keydown', function(e) {


re-pressed was to have a consistent way to identity keys with cross-browser support, and enable you to only add a keydown event listener once ... and just hot-swap out the handling function. This second part was useful to me, because i was finding myself adding scattered event listeners and then they would clash on page changes... or get duplicated with figwheel