xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

React Design Patterns All In One

React Design Patterns All In One

useContext Hook

//

https://zh-hans.reactjs.org/docs/hooks-reference.html#usecontext
https://zh-hans.reactjs.org/docs/context.html

生产者/消费者模式

Provider / Consumer

提供者 / 消费者

https://www.patterns.dev/posts/provider-pattern/

https://refactoringguru.cn/design-patterns/observer

设计模式 / 行为模式 / 观察者模式

亦称: 事件订阅者、监听者、Event-Subscriber、Listener、Observer
意图: 观察者模式是一种行为设计模式, 允许你定义一种订阅机制, 可在对象事件发生时通知多个 “观察” 该对象的其他对象。

refs

https://www.patterns.dev/

23 种设计模式

https://refactoringguru.cn/design-patterns

https://codesandbox.io/u/xgqfrms/sandboxes



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-05-29 17:29  xgqfrms  阅读(29)  评论(1编辑  收藏  举报