Skip to content

[Bug]: legacy-sub signal-fn is not backward compatible #821

@RolT

Description

@RolT

What happened?

The signal fn in the :legacy-sub mode of the new alpha namespace receives the query map instead of the query vector. The computation-fn receives the query vector as expected.

cljs.user> 
(reg-sub :a 
   (fn [v] (println "Signal argument:" v) (atom nil)) 
   (fn [_ v] (println "Computation argument:" v)))
;; => #object [re_frame$subs$alpha$subs_handler_fn]
cljs.user> (subscribe [:a 1])
Signal argument: {:re-frame/q :a, :re-frame/lifecycle :default, :re-frame/query-v [:a 1]}
Computation argument: [:a 1]
;; => #object [reagent.ratom.Reaction {:val nil}]

Version

1.4.3

What runtimes are you seeing the problem on?

Google Chrome

Relevant console output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions