Skip to content

Commit

Permalink
Fix macro typehint (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
aiba committed Sep 18, 2023
1 parent 8aaab44 commit ecaafdb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/helix/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@
(provider {:context my-context :value my-value} child1 child2 ...childN)"
[{:keys [context value] :as props} & children]
`^js/React.Element ($ (.-Provider ^js/React.Context ~context)
;; use contains to guard against `nil`
~@(when (contains? props :value)
`({:value ~value}))
~@children))
`(let [^{:tag ~'js} ctx# ~context]
^js/React.Element ($ (.-Provider ctx#)
;; use contains to guard against `nil`
~@(when (contains? props :value)
`({:value ~value}))
~@children)))


(defmacro suspense
Expand Down

0 comments on commit ecaafdb

Please sign in to comment.