Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100873887
useUpdatedRef.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 3, 12:20
Size
283 B
Mime Type
text/x-java
Expires
Wed, Feb 5, 12:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24046180
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
useUpdatedRef.js
View Options
import
{
useRef
}
from
'react'
;
/**
* Returns a ref that is immediately updated with the new value
*
* @param value The Ref value
* @category refs
*/
export
default
function
useUpdatedRef
(
value
)
{
var
valueRef
=
useRef
(
value
);
valueRef
.
current
=
value
;
return
valueRef
;
}
Event Timeline
Log In to Comment