Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100918184
useEventCallback.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, 22:51
Size
276 B
Mime Type
text/x-java
Expires
Wed, Feb 5, 22:51 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24054097
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
useEventCallback.js
View Options
import
{
useCallback
}
from
'react'
;
import
useCommittedRef
from
'./useCommittedRef'
;
export
default
function
useEventCallback
(
fn
)
{
var
ref
=
useCommittedRef
(
fn
);
return
useCallback
(
function
()
{
return
ref
.
current
&&
ref
.
current
.
apply
(
ref
,
arguments
);
},
[
ref
]);
}
Event Timeline
Log In to Comment