Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99387588
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
Fri, Jan 24, 02:39
Size
276 B
Mime Type
text/x-java
Expires
Sun, Jan 26, 02:39 (2 d)
Engine
blob
Format
Raw Data
Handle
23788362
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