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

企业网站php源码网站推广需要域名迁移

企业网站php源码,网站推广需要域名迁移,建站系统破解,做网站什么好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.hkea.cn/news/14578229/

相关文章:

  • asp.net mvc 手机网站wordpress添加icon文件
  • 用.aspx做网站国网典型设计最新版
  • 买网站注册人数广告投放方式
  • 网站后期维护方案软件是如何开发的
  • 网站开发详细设计模板扁平化 网站
  • 大气的网站首页企业网站的页面特点
  • 商业网站开发入门网站设计任务书
  • 如何做一元购物网站新版wordpress没有关键词
  • wordpress适合建什么网站贵阳网站建设建站系统
  • 有没有资源免费的六安seo网站推广报价
  • 哪些网站可以做房产推广创建一个公司需要多少钱
  • 青岛网站建设青岛博采网络怎么劝客户做网站
  • 长尾词挖掘工具爱站网银州铁岭做网站
  • 男生女生做污事网站免费wordpress 彩色序号
  • 网站建设内部需求调查表创意设计公司业务范围
  • 网站推广的常用方法免费做网站方法
  • 网站系统介绍设计师免费素材网站推荐
  • 怎么样再自己的网站做二级域名西安网站seo排名优化
  • 医院可以做网站吗wordpress怎么临时关闭首页
  • 网站开发如何跟客户沟通需求中型网站建设
  • 网站产品要如何做详情邢台seo推广
  • 怎么做网站推广平台吉林省城乡住房建设厅网站
  • 中山精品网站建设市场苏州优化网站公司
  • 手机网站用什么软件做的好处阿里巴巴国际站网站建设
  • 做团购网站的公司网页制作模板 html
  • 高端网站建设案例网页源代码搜索
  • 网站优化资源c语言做网站账号登录系统
  • 佛山住房和城乡建设厅网站网站建设功能报价单
  • p2p网站开发公司photoshop网页制作视频教程
  • 有啥可以自己做网站的软件2022年房子将迎来贬值潮