上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页
摘要: 参考博客: https://segmentfault.com/a/1190000014979065 参考视频:https://www.bilibili.com/video/BV1Zt4y1i7d2?from=search&seid=2794796125273489545 问题:父组件包含子组件,当父 阅读全文
posted @ 2021-02-25 15:37 程序员草莓 阅读(171) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_45429539/article/details/113624800 百度到的第一个方法:1.执行npm install -g create-react-app全局安装2.执行npx create-react-app myapp创建项目 仍然不好用, 阅读全文
posted @ 2021-02-25 14:21 程序员草莓 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 推荐博客::: https://blog.csdn.net/rainnnbow/article/details/51125498 https://blog.csdn.net/xifeijian/article/details/10813339 https://blog.csdn.net/xifeij 阅读全文
posted @ 2021-02-24 17:51 程序员草莓 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 1 setState是谁调用的? this.setState setState的调用会引起React的更新生命周期的4个函数执行。 shouldComponentUpdate (true, should, 阀门)(当shouldComponentUpdate执行时,返回true,进行下一步,this 阅读全文
posted @ 2021-02-24 16:29 程序员草莓 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-02-23 16:52 程序员草莓 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 大佬博客:https://react.iamkasong.com/diff/one.html#%E7%BB%83%E4%B9%A0%E9%A2%98 参考视频: https://www.bilibili.com/video/BV1uh411177Q https://www.bilibili.com/ 阅读全文
posted @ 2021-02-23 16:10 程序员草莓 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 我的回答: 一 。setState是同步执行的,但是state并不一定会同步更新。 二。 setState在不同模式下,效果是不同的。 1如果是在concurrent模式下都是异步的。 reactDOM.createRoot 2如果是在legacy模式下, 三。this.state 是根据 isBa 阅读全文
posted @ 2021-02-23 15:49 程序员草莓 阅读(765) 评论(0) 推荐(0) 编辑
摘要: 参考链接:https://www.jianshu.com/p/514fe21b9914 https://blog.csdn.net/c_kite/article/details/80303341 react为什么需要引入新的生命周期函数? react V16.0前的生命周期。 1 组件初始化。2 挂 阅读全文
posted @ 2021-02-22 18:30 程序员草莓 阅读(54) 评论(0) 推荐(0) 编辑
摘要: react和vue对比: 1 什么是模块化: 从代码的角度进行分析。(可以复用的代码 ,抽离为单个模块,便于模块的维护和开发) 2 什么是组件化:从UI界面进行分析。(把可复用的UI元素,抽离为单独的组件) 3 组件化的好处: 抽离出为单独的组件。 4 vue如何实现组件化: 通过 vue文件,创建 阅读全文
posted @ 2021-02-22 15:53 程序员草莓 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 参考博客:https://blog.csdn.net/weixin_42458965/article/details/105687926 https://www.cnblogs.com/guojiabing/p/12213332.html target是事件触发的真实元素。(点击!) current 阅读全文
posted @ 2021-02-22 15:13 程序员草莓 阅读(207) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页