-
Notifications
You must be signed in to change notification settings - Fork 0
useLayoutEffect
Александр edited this page Jan 17, 2023
·
1 revision
export function useLayoutEffect(callback: React.EffectCallback, deps?: () => React.DependencyList): void
Analog React.useLayoutEffect(callback, deps())
import { afc, useLayoutEffect } from 'react-afc'
function Component(props) {
let dependency = 0
useLayoutEffect(() => {
// any actions
}, () => [dependency])
return () => {/*...*/}
}
export default afc(Component)
Component
Lifecycle
State
Redux
Other