3、路由 react-router-dom V6 用法剖析实现客户端以及服务端路由层面的同构React Router v6Redux Recoil Mbox实现一些自定义hooksWebpack babel vite Pnpm monorepoabortController 1、如何使用、二次封装2、状态管理工具的分类和比较,实际业务中如何选择Context API数据如何获取和设置状态的基本值如何管理数据异步工作流如何处理数据之间的联动即派生状态 (触发A的更新 联动B的更新)useContext + useReucer 数据量大需要创建大量context,对context state的变更会导致所有使用该contextre-redner,即时使用的不是修改的那个state值,可以采用useMemo来解决,但是仍存在一定成本单向数据流:redux react-redux大量模板代码、状态量大,需要把所有reducer跑一遍,潜在性能问题 响应式:MboxMbox对全局state做了一层代理,监听state变化,自动更新计算属性,响应状态变化的一些操作;所以mobox可以对
function getData(val) { return new Promise(resolve => { setTimeout(() => { resolve(val * 2) }, 1000); }) } async function get() { const data1 = await getData(1); const data2 = await getData(data1); return `success: ${data2}`; } get().then(res => { console.log('%c [ res ]-18', 'font-size:13px; background:pink; color:#bf2c9f;', res) }) function* getGen() { const data1 = yield getData(1) const data2 = yield getData(data1); return `success: ${data2}`; } v
基础篇实现Object.create实现instanceof方法实现new关键字拦截构造函数调用实现继承简单实现Promise防抖函数节流函数实现类型判断函数实现call函数实现apply函数实现bind浅拷贝深拷贝实现Object.assign简单实现async/await中的async函数实现一个Object.freeze用ES5实现一下map和reduce函数场景篇0.1+0.2问题大数相加解决[415.字符串相加]大数相乘[43.字符串相乘]数组乱序输出数组去重复(7种方法)数组扁平化flatten(6种方法)对象扁平化flatObj数字千分位分割js下划线转驼峰处理Hex转RGB的方法实现模版字符串解析数组转树形结构的三种方法获取URL中的参数进阶篇:请求并发控制带并发限制的promise异步调度器实现lazy链式调用: person.eat().sleep(2).eat()函数柯里化lazy-load实现实现简单的虚拟dom实现SWR 机制实现一个只执行一次的函数LRU 算法实现:LRU(Least recently used,最近最少使用)算法根据数据的历史访问记录来进行
1、时间复杂度、空间复杂度O(1),O(n),O(logn),O(n),O(nLogn),O(n^2),O(2^n),O(n!) 2、递归: 将问题分解为同类的子问题重复调用自身终止条件 重复循环逻辑3、爬楼梯(递归、递推)时间复杂度O(2^n)结合哈希map,存储中间过程,降为O(n) 或者递推,记录上两次的值进而获取最新结果4、合并两个有序数组LeetCode刷题双指针、递归 70 - 10 - 1 - 88 - 283 - 448链表:21 - 83 - 141 - 142 - 160 - 206 - 234 - 876 剑指offer22: 链表中倒数第k个节点栈和队列:232 用栈实现队列 394 字符串解码 树:二叉树的相关概念 中序、前序、后续遍历94-144-145 对称二叉树101 翻转二叉树226 十大排序算法:冒泡、选择、插入、快速、希尔、归并、堆、桶排序 二分查找动态规划字符串搜索贪心算法
欢迎使用typecho建站
李优秀同学
待会去码头整点薯条