UNPKG
ariakit-react-utils
Version:
latest (0.17.0-next.27)
0.17.0-next.27
0.17.0-next.26
Ariakit React utils
ariakit.org
ariakit/ariakit
ariakit-react-utils
/
cjs
/
misc.js
15 lines
(12 loc)
•
227 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'
;
/** * Sets both a function and object React ref. */
function
setRef
(
ref, value
) {
if
(
typeof
ref ===
"function"
) {
ref
(value); }
else
if
(ref) { ref.
current
= value; } }
exports
.
setRef
= setRef;