Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100875428
useMountEffect.d.ts
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:42
Size
493 B
Mime Type
text/x-java
Expires
Wed, Feb 5, 12:42 (2 d)
Engine
blob
Format
Raw Data
Handle
24040880
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
useMountEffect.d.ts
View Options
import { EffectCallback } from 'react';
/**
* Run's an effect on mount, and is cleaned up on unmount. Generally
* useful for interop with non-react plugins or components
*
* ```ts
* useMountEffect(() => {
* const plugin = $.myPlugin(ref.current)
*
* return () => {
* plugin.destroy()
* }
* })
* ```
* @param effect An effect to run on mount
*
* @category effects
*/
declare function useMountEffect(effect: EffectCallback): void;
export default useMountEffect;
Event Timeline
Log In to Comment