Skip to content

Commit

Permalink
Make component-did-mount optional
Browse files Browse the repository at this point in the history
  • Loading branch information
luciodale committed Jan 5, 2020
1 parent 73e4d30 commit 1e409d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ As at this state you must be dying of curiosity, I will dive right into the code
#### In Deps

```clojure
fork {:mvn/version "1.2.2"}
fork {:mvn/version "1.2.3"}
```

or
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject fork "1.2.2"
(defproject fork "1.2.3"
:description "Reagent & Re-Frame form library"
:url "https://github.com/luciodale/fork"
:license {:name "MIT"}
Expand Down
3 changes: 2 additions & 1 deletion src/fork/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
:path (:path props)})))}]
(r/create-class
{:component-did-mount
#((:component-did-mount props) handlers)
#(when-let [on-mount (:component-did-mount props)]
(on-mount handlers))
:component-will-unmount
(fn []
(when (:clean-on-unmount? props)
Expand Down

0 comments on commit 1e409d5

Please sign in to comment.