-
Notifications
You must be signed in to change notification settings - Fork 126
Home
Andre R edited this page Jul 5, 2016
·
9 revisions
See:
https://github.com/r0man/sablono/wiki/Optimization-Tips
See:
[rum "0.9.0" :exclusions [cljsjs/react cljsjs/react-dom]]
[cljsjs/react-dom "15.1.0-0" :exclusions [cljsjs/react]]
[cljsjs/react-dom-server "15.1.0-0" :exclusions [cljsjs/react]]
[cljsjs/react-with-addons "15.1.0-0"]
Profiling with React perf
Specify the react-with-addons
dependency in your project.clj
(see above ↑)
Then from within your program run:
(js/React.addons.Perf.start)
;;run your app
(js/React.addons.Perf.stop)
(js/React.addons.Perf.printWasted)
and results will be printed to the developer console.
This might be useful for development when you want to know which component this mixin is handling:
(ns ...
(:require [goog.object :as gobj]))
(defn display-name
"Returns the displayname of the component"
[state]
(gobj/getValueByKeys
(:rum/react-component state)
"constructor"
"displayName"))