跳到主要内容

React 钩子效果标签

一、作用

// 无标志
export const NoFlags = /* */ 0b0000;

// Represents whether effect should fire.
// 表示效果是否应该触发。
// 有影响
export const HasEffect = /* */ 0b0001;

// Represents the phase in which the effect (not the clean-up) fires.
// 表示效果(而不是清理)触发的阶段。
// 插入
export const Insertion = /* */ 0b0010;
// 布局
export const Layout = /* */ 0b0100;
// 被动
export const Passive = /* */ 0b1000;