Open petterik opened 6 years ago
Could add new functions for interacting with a component that doesn't have to pass this
this
Example:
;; instead of: (dom/button #js {:onClick #(la/update-state! this (fn [state] (assoc state :foo :bar)))}) ;; Could have: (dom/button #js {:onClick (la/update-state #(assoc % :foo :bar))})
Notice that:
#
!
Same for transact, possibly for the computed functions as well and others?
Might want to bind additional *props* and *state* vars as well, to access reads and state without passing this. Examples:
*props*
*state*
(la/read :people) (la/state :foo)
Not sure if this is useful though.
Could add new functions for interacting with a component that doesn't have to pass
this
Example:
Notice that:
this
is gone.#
char is not used to create an anonymous function.!
removed. Not sure if that's good naming.Same for transact, possibly for the computed functions as well and others?