Skip to content

Commit

Permalink
viewer memoized
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Oct 28, 2024
1 parent c1ed38f commit 5d95ca2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dali/viewer.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
:else
[:p "loading.."])))

(defn viewer-memoized [dali-spec]
(react/useMemo viewer-impl (clj->js [dali-spec])))

(defn viewer2 [dali-spec]
[:f> viewer-impl dali-spec])
[:f> viewer-memoized dali-spec])

0 comments on commit 5d95ca2

Please sign in to comment.