Skip to content
#

Redux

redux logo

Redux is an open source JavaScript library, designed to allow for state management of JavaScript applications. Inspired by Elm, Redux is a debugging tool and supports robust application data-flow architecture. Redux is frequently used in combination with React.

Here are 30,894 public repositories matching this topic...

atvoid
atvoid commented Mar 15, 2021

When we have multiple iframes with the same origin, we can share objects between different iframe window. But immer produce has a check isPlainObject(), there is a condition "Object.getPrototype(xxx) === Object.prototype", which makes this scenario broken. Because the window.Object.prototype in different iframes have different instances. This condition will return false.

The basic repro example

responsively-app
a616781689
a616781689 commented Nov 28, 2019

看了fish-redux的todoList demo,发现里面连接全局状态的方法是使用visitor

visitor: (String path, Page<Object, dynamic> page) {
      /// 只有特定的范围的 Page 才需要建立和 AppStore 的连接关系
      /// 满足 Page<T> ,T 是 GlobalBaseState 的子类
      if (page.isTypeof<GlobalBaseState>()) {
        /// 建立 AppStore 驱动 PageStore 的单向数据连接
        /// 1. 参数1 AppStore
        /// 2. 参数2 当 AppStore.state 变化时, PageStore.state 该如何变化
     

Created by Dan Abramov and Andrew Clark

Released June 2, 2015

Repository
reactjs/redux
Website
redux.js.org
Wikipedia
Wikipedia

Related Topics

javascript react