Reducers should be pure functions.Reducers must be pure functions.任何分派的操作都会通过reducer 向store返回一个新状态。 Any action returns a new state via reducers .
An action informing the reducers that a request began. 主要为了减少mapper和reducer 之间的数据传输。 This requires moving data between mappers and reducers . Reducer 有3个主要阶段:shuffle、sort和reduce。Reducer has 3 primary phases: shuffle, sort and reduce. 替换store当前用来计算state的reducer 。 Replaces the reducer currently used by the store to calculate the state. Reducer 有3个主要阶段:shuffle、sort和reduce。The reduce phase has 3 steps: Shuffle, Sort, and Reduce. 若干个reducer 方法实例也会在不同机子上被实例化。 Several instances of the reducer method are also instantiated on the different machines. Reducer (Function)store会使用的下一个reducer 。Reducer (Function) The next reducer for the store to use.能帮助减少mapper和reducer 之间的数据传输量. This will help to cut down the amount of data shuffled between the mappers and the reducers . 编写Reducer 来指定如何通过action来转换state。 Reducers are written to specify how the states can be transformed by actions. 你可能听说过术语"reducer "用来描述Redux的重要状态更新。 You might have heard the expression reducer used to refer to the important state update bits of Redux. Reducer 只是一些纯函数,它接收先前的state和action,并返回新的state。Reducers receive the current state and an action and return the new state.着Combiner的输出会被发送到Reducer 那里,而不是发送Mapper的输出。 The output from the Combiner is then sent to the Reducers , instead of the output from the Mappers. Reducer 只是一些纯函数,它接收先前的state和触发action,并返回新的state。Reducers receive the current state and an action and return the new state.对于数组中的每个元素,reducer 被调用,并将累加器和当前值作为参数传入。 For each item in the array, the reducer is called, passing it the accumulator and the current array element. 根reducer 应该把多个子reducer输出合并成一个单一的state树。 The root reducer can combine the output of various reducers into a single state tree. 例如,Redux会让你组合reducer,而不是在每个reducer 中处理整个应用程序状态。 For example, Redux lets you compose reducers rather than deal with the entire app state inside each reducer . Reducer 只是一些纯函数,它接收先前的state和action,并返回新的state。Reducers are pure functions that take in a state and action and return a new state. 你可以将reducer 中的一些逻辑拆分出去,然后在父函数中调用这个新的函数。 You can split some of your reducer logic out into another function, and call that new function from the parent function. Reducer 然后生成最终的(word,count)输出,并把它写到一个输出文件里。The reducer then emits the final(word, count) output which is written to an output file. Redux将这个概念称为reducer composition,带目前为止,这个方法是构建reducer 逻辑最常用的方法。 Redux refers to this concept as reducer composition, and it is by far the most widely-used approach to structuring reducer logic. Reducer 只是一些纯函数,它接收先前的state和action,并返回新的state。The reducer is simply a pure function that takes state and action, then returns new state. Mapper和Reducer 的实现可以利用Reporter来报告进度,或者仅是表明自己运行正常。 Mapper and Reducer implementations can use the Reporter to report progress or just indicate that they are alive. Reducer 只是一些纯函数,它接收先前的state和action,并返回新的state。Reducers are pure functions that take in the previous state and an action and returns a new state. Reducer 只是一些纯函数,它接收先前的state和触发action,并返回新的state。Reducers are just pure functions that take the previous state and an action, and return the next state. Reducer 只是一些纯函数,它接收先前的state和action,并返回新的state。Reducers are split into multiple reducer functions, that easy take the previous state and an action and returns a new state.
展示更多例子
结果: 65 ,
时间: 0.0148
English
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt