React fiber config with no resources
不支持水合的渲染器可以从此模块重新导出所有内容。
一、作用
不支持水合的渲染器可以从此模块重新导出所有内容。
二、导出的类型
1. 可提升根
export type HoistableRoot = mixed;
2. 资源
export type Resource = mixed;
三、导出的常量
1. 支持资源
备注
源码中 25 行
// Resources (when unsupported)
// 资源(当不支持时)
export const supportsResources = false;
2. 是否为可升降类型
备注
源码中 26 行
export const isHostHoistableType = shim;
3. 获取可提升的根
备注
源码中 27 行
export const getHoistableRoot = shim;
4. 获取资源
备注
源码中 28 行
export const getResource = shim;
5. 取得资源
备注
源码中 29 行
export const acquireResource = shim;
6. 释放资源
备注
源码中 30 行
export const releaseResource = shim;
7. 可提升的水化
备注
源码中 31 行
export const hydrateHoistable = shim;
8. 可安装提升
备注
源码中 32 行
export const mountHoistable = shim;
9. 卸载可提升组件
备注
源码中 33 行
export const unmountHoistable = shim;
10. 创建可提升实例
备注
源码中 34 行
export const createHoistableInstance = shim;
11. 准备提交可提升项
备注
源码中 35 行
export const prepareToCommitHoistables = shim;
12. 可挂起资源提交
备注
源码中 36 行
export const mayResourceSuspendCommit = shim;
13. 预下载资源
备注
源码中 37 行
export const preloadResource = shim;
14. 挂起资源
备注
源码中 38 行
export const suspendResource = shim;
四、工具
1. 兼容垫片
// Renderers that don't support hydration
// can re-export everything from this module.
// 不支持水合的渲染器可以从此模块重新导出所有内容。
function shim(...args: any): empty {
throw new Error(
'The current renderer does not support Resources. ' +
'This error is likely caused by a bug in React. ' +
'Please file an issue.',
);
}