Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121604794
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
Sat, Jul 12, 09:29
Size
283 B
Mime Type
text/x-java
Expires
Mon, Jul 14, 09:29 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27356697
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