跳到主要内容

React fiber config with not persistence

不支持持久化的渲染器可以重新导出该模块的所有内容。

一、作用

不支持持久化的渲染器可以重新导出该模块的所有内容。

二、导出的常量

1. 支持持久性

// Persistence (when unsupported)
// 持久化(当不支持时)

// 支持持久性
export const supportsPersistence = false;

2. 克隆实例

export const cloneInstance = shim;

3. 创建容器子集

export const createContainerChildSet = shim;

4. 将子节点添加到容器子集

export const appendChildToContainerChildSet = shim;

5. 最终确定容器子元素

export const finalizeContainerChildren = shim;

6. 替换容器子元素

export const replaceContainerChildren = shim;

7. 克隆隐藏实例

export const cloneHiddenInstance = shim;

8. 克隆隐藏文本实例

export const cloneHiddenTextInstance = shim;

三、工具

1. 兼容垫片

// Renderers that don't support persistence
// can re-export everything from this module.
// 不支持持久化的渲染器可以重新导出该模块的所有内容。

function shim(...args: any): empty {
throw new Error(
'The current renderer does not support persistence. ' +
'This error is likely caused by a bug in React. ' +
'Please file an issue.',
);
}