当前位置: 首页 > news >正文

网站建设 清远魔方网络建筑模板多少钱一张什么尺寸

网站建设 清远魔方网络,建筑模板多少钱一张什么尺寸,千年之恋网页设计代码,苏州工业园区做政务网站的公司HostText 1 #xff09;概述 在 completeWork 中 对 HostText的处理在第一次挂载和后续更新的不同条件下进行操作 第一次挂载主要是创建实例后续更新其实也是重新创建实例 2 #xff09;源码 定位到 packages/react-reconciler/src/ReactFiberCompleteWork.js#L663 到 c…HostText 1 概述 在 completeWork 中 对 HostText的处理在第一次挂载和后续更新的不同条件下进行操作 第一次挂载主要是创建实例后续更新其实也是重新创建实例 2 源码 定位到 packages/react-reconciler/src/ReactFiberCompleteWork.js#L663 到 case HostText 这里 case HostText: {let newText newProps;// 符合这个条件说明它不是第一次渲染就是更新的状态// 调用 updateHostText 进行更新if (current workInProgress.stateNode ! null) {const oldText current.memoizedProps;// If we have an alternate, that means this is an update and we need// to schedule a side-effect to do the updates.updateHostText(current, workInProgress, oldText, newText);} else {// 对于第一次渲染if (typeof newText ! string) {invariant(workInProgress.stateNode ! null,We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.,);// This can happen when we abort work.}// 跳过 context 处理const rootContainerInstance getRootHostContainer();const currentHostContext getHostContext();// 跳过 hydrate 处理let wasHydrated popHydrationState(workInProgress);if (wasHydrated) {if (prepareToHydrateHostTextInstance(workInProgress)) {markUpdate(workInProgress);}} else {// 创建 文本 实例workInProgress.stateNode createTextInstance(newText,rootContainerInstance,currentHostContext,workInProgress,);}}break; }进入 updateHostText updateHostText function(current: Fiber,workInProgress: Fiber,oldText: string,newText: string, ) {// 这个非常简单通过前后 text 是否有区别// 如果不同则创建新的 text实例if (oldText ! newText) {// If the text content differs, well create a new text instance for it.// 先跳过 context 的处理const rootContainerInstance getRootHostContainer();const currentHostContext getHostContext();workInProgress.stateNode createTextInstance(newText,rootContainerInstance,currentHostContext,workInProgress,);// Well have to mark it as having an effect, even though we wont use the effect for anything.// This lets the parents know that at least one of their children has changed.markUpdate(workInProgress);} };进入 createTextInstance// packages/react-dom/src/client/ReactDOMHostConfig.js#L272 export function createTextInstance(text: string,rootContainerInstance: Container,hostContext: HostContext,internalInstanceHandle: Object, ): TextInstance {if (__DEV__) {const hostContextDev ((hostContext: any): HostContextDev);validateDOMNesting(null, text, hostContextDev.ancestorInfo);}const textNode: TextInstance createTextNode(text, rootContainerInstance);// 这个方法之前阅过precacheFiberNode(internalInstanceHandle, textNode);return textNode; }进入 createTextNodeexport function createTextNode(text: string,rootContainerElement: Element | Document, ): Text {// 最终 getOwnerDocumentFromRootContainer 这里返回一个dom对象调用dom的 createTextNode 这个方法return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text,); }进入 getOwnerDocumentFromRootContainer function getOwnerDocumentFromRootContainer(rootContainerElement: Element | Document, ): Document {// rootContainerElement.ownerDocument 这里是 window.document 对象// 这么做是为了兼容多平台api的使用return rootContainerElement.nodeType DOCUMENT_NODE? (rootContainerElement: any): rootContainerElement.ownerDocument; }HostText 相比于 HostComponents 来说它没有多种选择 没有各种各样的属性整体来说非常的简单 一些特别说明的写在了上述代码注释中
http://www.dnsts.com.cn/news/220587.html

相关文章:

  • 网站结合微信涟水网站建设
  • 视频多的网站建设山西建设工程备案网站
  • 国内网站空间 优帮云wordpress 图片宽度
  • 怎么做网站 教学sns有哪些著名的网站
  • 网站建设公司 专题制作google搜索引擎入口
  • 网站流量统计 设计图图网
  • 深圳网站搭建费用有什么网站可以兼职做翻译
  • h5建站系统合肥专业做网站公司有哪些
  • thinkphp怎么做网站会员管理系统下载
  • 网站建设与开发 教材网站开发调查表
  • 江门免费模板建站智慧团建登录网站入口
  • 网站建设 经营范围网站开发具体做什么的
  • 网站的视频做gif企业vi是什么
  • 档案网站建设的步骤什么是二级域名网站
  • 建个企业网站网站建设要域名和什么
  • asp 网站访问统计tk注册网站
  • 网站建设开发合同范本怎么制作表格教程
  • 济南快速建站模板河南网站推广
  • 怎样做自己的个人网站商标注册查询app
  • 网站建设答辩ppt模板腾讯学生服务器可以做网站吗
  • 学生诚信档案建设网站wordpress id乱码
  • 湖南网站营销推广设计网站建设开始学什么
  • 做网站公司大连江苏定制网站建设费用
  • 浙江网站备案查询天津自助建站软件
  • 自己网站做第三方支付合肥网络推广公司哪家专业
  • 深圳网站建设需要多少费用物联网出来做什么工作
  • 宁波住房和城乡建设部网站模板网站怎么用
  • 鄂州网站设计制作公司跳转网站怎么做的
  • 推广网站的方法有搜索引擎云主机怎么装网站
  • 车辆管理网站开发教育网站建设规划书