mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 04:21:38 +02:00
✨ Update to React 18
This commit is contained in:
parent
5ea9a52e69
commit
4b8ee8ef84
30 changed files with 396 additions and 250 deletions
|
@ -226,6 +226,13 @@
|
|||
(reset! ptr value))
|
||||
ptr))
|
||||
|
||||
(defn use-update-ref
|
||||
[value]
|
||||
(let [ref (mf/use-ref value)]
|
||||
(mf/with-effect [value]
|
||||
(mf/set-ref-val! ref value))
|
||||
ref))
|
||||
|
||||
(defn use-ref-callback
|
||||
"Returns a stable callback pointer what calls the interned
|
||||
callback. The interned callback will be automatically updated on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue