Created
October 17, 2019 11:24
-
-
Save akovantsev/2513e2f8e43fc77bb1ac62f363051f37 to your computer and use it in GitHub Desktop.
rum-debug-mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn rum-debug-mixin [component-name] | |
| (let [p (partial prn component-name)] | |
| {:init (fn [state props] (p :init props) state) | |
| :will-mount (fn [state] (p :will-mount) state) | |
| :before-render (fn [state] (p :before-render) state) | |
| :wrap-render (fn [render-fn] (p :wrap-render) render-fn) | |
| ;:render (fn [state] (p :render) [[:div#pseudo-dom {} "pseudodom"] state]) | |
| :did-catch (fn [state, err, info] (p :did-catch err info) state) | |
| :did-mount (fn [state] (p :did-mount) state) | |
| :after-render (fn [state] (p :after-render) state) | |
| :did-remount (fn [old-state state] (p :did-remount) state) | |
| :should-update (fn [old-state state] (p :should-update) false) | |
| :will-update (fn [state] (p :will-update) state) | |
| :did-update (fn [state] (p :did-update) state) | |
| :will-unmount (fn [state] (p :will-unmount) state)})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment