摘要: 1. react 中的 context 使用了生产者消费者模式 【Provider和Customer模式】。 2. 可以在顶层的Provider中传入value,在子孙级的Consumer中获取该值,并且能够传递函数,用来修改context // 1. context.js 中 import Rea 阅读全文
posted @ 2020-06-11 16:34 monkey-K 阅读(150) 评论(0) 推荐(0) 编辑