(callback, args)
| 273 | * @returns {void} |
| 274 | */ |
| 275 | export function useEffect(callback, args) { |
| 276 | /** @type {import('./internal').EffectHookState} */ |
| 277 | const state = getHookState(currentIndex++, 3); |
| 278 | if (!options._skipEffects && argsChanged(state._args, args)) { |
| 279 | state._value = callback; |
| 280 | state._pendingArgs = args; |
| 281 | |
| 282 | currentComponent.__hooks._pendingEffects.push(state); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * @param {import('./internal').Effect} callback |
searching dependent graphs…