File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 193193
194194 :componentDidMount
195195 (fn componentDidMount []
196- (this-as c (.call f c c)))
196+ (this-as c
197+ (when (.-cleanup-queued ^clj c)
198+ (set! (.-cleanup-cancelled ^clj c) true )
199+ (set! (.-cleanup-queued ^clj c) false ))
200+ (when-not (nil? f)
201+ (.call f c c))))
197202
198203 :componentWillUnmount
199204 (fn componentWillUnmount []
200205 (this-as c
201- (some-> (gobj/get c " cljsRatom" ) ratom/dispose!)
202- (batch/mark-rendered c)
206+ ; ; (some-> (gobj/get c "cljsRatom") ratom/dispose!)
207+ (set! (.-cleanup-cancelled ^clj c) false )
208+ (set! (.-cleanup-queued ^clj c) true )
209+ (.then (.resolve js/Promise nil )
210+ (fn []
211+ (when (false ? (.-cleanup-cancelled ^clj c))
212+ (set! (.-cleanup-queued ^clj c) false )
213+ (batch/mark-rendered c)
214+ (some-> (gobj/get c " cljsRatom" ) ratom/dispose!))))
203215 (when-not (nil? f)
204216 (.call f c c))))
205217
218230; ; Though the value is nil here, the wrapper function will be
219231; ; added to class to manage Reagent ratom lifecycle.
220232(def obligatory {:shouldComponentUpdate nil
233+ :componentDidMount nil
221234 :componentWillUnmount nil })
222235
223236(def dash-to-method-name (util/memoize-1 util/dash-to-method-name))
You can’t perform that action at this time.
0 commit comments