day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Events tab doesn't display implicit do's on `fn-traced` #266

Closed stumitchell closed 4 years ago

stumitchell commented 4 years ago

contrast the presentation of the top level form directly under the event tab

(re-frame/reg-event-db
 ::let
 (fn-traced [db _]
   (let [a 10
         b (+ a 20)]
     (+ a b))
    db))

image

Instead of just 'db' as shown in the above image The whole form should be displayed as shown below.

 ::let
 (fn-traced [db _]
   (let [a 10
         b (+ a 20)]
     (+ a b)
     db)))

image

I suspect the difference is because the fn-traced macro in the first example contains 2 top level forms (i.e. an implied do) while the second example contains only one top level form

stumitchell commented 4 years ago

fixed in https://github.com/day8/re-frame-debux/commit/fe7131379f8d9f93ef8c5ea3f33d33716bca20cc