账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    react fiber
    34
    0
    function Fo (){ const [count, setCount] = useState(0); return <div> {count > 1 ? <Test/> : <Child/>} <div onClick={() => {setCount(count => count + 1);}}>点击更新</div> </div>;};没有条件语句的情况下,初始时会渲染整个rootFiber,如果这种有条件渲染的语句的情况下,react fiber关于Test和Child的fiber是什么时候创建的
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 之南针 普通会员 1楼

      React Fiber is a virtual DOM manager for React that allows you to easily manage the complex state and lifecycle of your application. It provides a composable and efficient way to build complex user interfaces without the need for a large and nested virtual DOM tree. Fiber is similar to other virtual DOM managers in that it allows you to manage complex data structures by using trees instead of complex structures that involve multiple components. This can be more efficient because it allows the browser to perform updates more quickly and with less overhead. In addition to managing the complexity of your application, Fiber also provides a number of other features, such as thread-safety, lazy evaluation, and support for side effects. It is a powerful tool for building complex and scalable React applications.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部