re-frame-10x icon indicating copy to clipboard operation
re-frame-10x copied to clipboard

Template Issues

Open mike-thompson-day8 opened this issue 7 years ago • 2 comments
trafficstars

If I create a new project using the re-frame-template, like this:

lein new re-frame test1 +trace +re-com
cd test1
lein figwheel dev

and then I open http://localhost:3449 (as per the instructions in the template) , I see:

  • the re-frame-trace panel already open on the RHS
  • it is showing a nil event

image

But this isn't right. There has, indeed, been an event dispatched (in init at line 20 of test1/core.cljs. So there should be an event [:test1.events/initialize-db] showing.

If I keep going and create a button for myself, which dispatches an event, say [:bar] and I click it (so now there should be two events in history), only THEN do I see two events:

  1. the previously missing [:test1.events/initialize-db]
  2. the just-dispatched [:bar]

So clearly it knew about the original [:test1.events/initialize-db],even when it was saying nil

mike-thompson-day8 avatar Feb 11 '18 09:02 mike-thompson-day8

Debugging notes:

  • A minimal failing/succeeding case is using dispatch-sync/dispatch for [::events/initialize-db] on the re-frame template app.
  • Reordering the initial render call to come before the dispatch-sync works
  • The initial reagent.dom/render call doesn't request an animation frame to render into, presumably it writes synchronously to the DOM.
  • The event isn't being detected because there are no ending raf calls to trigger it: screenshot of google chrome 12-02-18 6-55-30 pm

danielcompton avatar Feb 12 '18 05:02 danielcompton

Still the same problem persists:

lein new re-frame test +10x
cd test
lein figwheel

after opening browser on localhost:3449, it shows 10x dashboard with no events and no app db information. Any idea how to fix this?

pavel-klavik avatar Dec 17 '18 11:12 pavel-klavik