React fiber config with no hydration
一、作用
二、导出的类型
1. 活动实例
export type ActivityInstance = mixed;
2. 挂起实例
export type SuspenseInstance = mixed;
1.
三、导出的常量
1. 支持水化
备注
源码中 24 行
export const supportsHydration = false;
2. 当前是否是挂起实例挂起中
备注
源码中 25 行
export const isSuspenseInstancePending = shim;
3. 判定是否是挂起实例回退
备注
源码中 26 行
export const isSuspenseInstanceFallback = shim;
4. 获取挂起实例回退错误详情
备注
源码中 27 行
export const getSuspenseInstanceFallbackErrorDetails = shim;
5. 注册挂起实例重试
备注
源码中 28 行
export const registerSuspenseInstanceRetry = shim;
6. 可以水合表单状态标记
备注
源码中 29 行
export const canHydrateFormStateMarker = shim;
7. 是否表单状态标记匹配
备注
源码中 30 行
export const isFormStateMarkerMatching = shim;
8. 获取下一个可水化的同级元素
备注
源码中 31 行
export const getNextHydratableSibling = shim;
9. 获取单例后的下一个可水化兄弟元素
备注
源码中 32 行
export const getNextHydratableSiblingAfterSingleton = shim;
10. 获取第一个可水化的子元素
备注
源码中 33 行
export const getFirstHydratableChild = shim;
11. 获取容器内第一个可水化的子元素
备注
源码中 34 行
export const getFirstHydratableChildWithinContainer = shim;
12. 获取活动实例内第一个可水合的子项
备注
源码中 35 行
export const getFirstHydratableChildWithinActivityInstance = shim;
13. 获取悬挂实例内的第一个可水化子节点
备注
源码中 36 行
export const getFirstHydratableChildWithinSuspenseInstance = shim;
14. 获取单例内的第一个可水合子元素
备注
源码中 37 行
export const getFirstHydratableChildWithinSingleton = shim;
15. 可以水化实例
备注
源码中 38 行
export const canHydrateInstance = shim;
16. 可以水化文本实例
备注
源码中 39 行
export const canHydrateTextInstance = shim;
17. 可以水化活动实例
备注
源码中 40 行
export const canHydrateActivityInstance = shim;
18. 可以水合的挂起实例
备注
源码中 41 行
export const canHydrateSuspenseInstance = shim;
19. 水合实例
备注
源码中 42 行
export const hydrateInstance = shim;
20. 水合文本实例
备注
源码中 43 行
export const hydrateTextInstance = shim;
21. 水合活动实例
备注
源码中 44 行
export const hydrateActivityInstance = shim;
22. 水合挂起实例
备注
源码中 45 行
export const hydrateSuspenseInstance = shim;
23. 获取活动实例后的下一个可水化实例
备注
源码中 46 行
export const getNextHydratableInstanceAfterActivityInstance = shim;
24. 获取挂起实例之后的下一个可水化实例
备注
源码中 47 行
export const getNextHydratableInstanceAfterSuspenseInstance = shim;
25. 完成已水合的子元素
备注
源码中 48 行
export const finalizeHydratedChildren = shim;
26. 提交已水化实例
备注
源码中 49 行
export const commitHydratedInstance = shim;
27. 提交已水化的容器
备注
源码中 50 行
export const commitHydratedContainer = shim;
28. 提交已水合的活动实例
备注
源码中 51 行
export const commitHydratedActivityInstance = shim;
29. 提交已挂起的挂起实例
备注
源码中 52 行
export const commitHydratedSuspenseInstance = shim;
30. 刷新水化事件
备注
源码中 53 行
export const flushHydrationEvents = shim;
31. 清除活动边界
备注
源码中 54 行
export const clearActivityBoundary = shim;
32. 清除挂起边界
备注
源码中 55 行
export const clearSuspenseBoundary = shim;
33. 从容器清除活动边界
备注
源码中 56 行
export const clearActivityBoundaryFromContainer = shim;
34. 从容器中清除悬念边界
备注
源码中 57 行
export const clearSuspenseBoundaryFromContainer = shim;
35. 隐藏脱水边界
备注
源码中 58 行
export const hideDehydratedBoundary = shim;
36. 取消隐藏脱水边界
备注
源码中 59 行
export const unhideDehydratedBoundary = shim;
37. 应该删除未水化的尾部实例
备注
源码中 60 行
export const shouldDeleteUnhydratedTailInstances = shim;
38. 用于开发警告的差异化水合属性
备注
源码中 61 行
export const diffHydratedPropsForDevWarnings = shim;
39. 用于开发警告的差异水合文本
备注
源码中 62 行
export const diffHydratedTextForDevWarnings = shim;
40. 为开发警告描述可水化实例
备注
源码中 63 行
export const describeHydratableInstanceForDevWarnings = shim;
41. 验证可水合实例
备注
源码中 64 行
export const validateHydratableInstance = shim;
42. 验证可水合文本实例
备注
源码中 65 行
export const validateHydratableTextInstance = 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 hydration. ' +
'This error is likely caused by a bug in React. ' +
'Please file an issue.',
);
}