Questions tagged [reducers]

Refers to reducers in the mapreduce framework. Mappers split up a large problem and solve parts of it in parallel. Reducers collect and summarize the output of a map method.

Reference: https://en.wikipedia.org/wiki/MapReduce

819 questions
3
votes
1 answer

Redux State not Updating the first time

I know there are a lot of same questions posted in this site but none of them links to my issue. This is close to mine but I am not working with DB yet. Just a complete react/redux implementation. I am implementing redux in my sample project for…
HTTP
  • 1,674
  • 3
  • 17
  • 22
3
votes
2 answers

Avoid single file with hive.optimize.sort.dynamic.partition option

I'm using hive. When I write dynamic partitions with INSERT query and turn on hive.optimize.sort.dynamic.partition option(SET hive.optimize.sort.dynamic.partition=true), always there is single file in each partition. But if I turn of that option(SET…
Juhong Jung
  • 101
  • 1
  • 7
3
votes
1 answer

Reducing a set of predicate functions

I have an array of predicates coming into a function we'll call searchForAcceptableNumber. searchForAcceptableNumber(arrayOfNumbers: number[], ...isNumberAcceptablePredicates: Array<(aNumber: number) => boolean>): number[] { const…
Grey Haven
  • 380
  • 2
  • 13
3
votes
2 answers

Redux: Reuse a reducer to update multiple state properties

Perhaps it's just a missing piece of information in my Redux knowledge, but even after seaching for hours, I still have no idea how to create a reusable reducer to update many state properties. Let's say, I create a simple component MySwitch…
3
votes
1 answer

Redux action not triggering reducers

Problem I wired up my react application with a Redux store, added an api action to gather data from my backend including middleware redux-promise. Most everything seems to work as I can see my store in the React web editor along with the combine…
Evan Bates
  • 31
  • 2
3
votes
0 answers

State not getting updated after editing in react js

Edit-This code is working fine now I have been trying to update the paid property of an array of object called bill using the specific id. the object that is getting passed to the action is not changing accordingly as well as the update is also not…
3
votes
1 answer

How is JavaScript's Reduce assigning its value?

Problem: I do not understand how reduce is assigning/reducing the customer name from the array. I need for someone to please explain precisely what is happening here. Detailed Description In episode 4 of Fun Fun Function's functional programming…
Anthony Gatlin
  • 4,407
  • 5
  • 37
  • 53
3
votes
1 answer

ngrx lazy load access to root state

I'm developing an application with ngrx that leverages lazy loaded reducers, which works fine so far. I'm running into a scenario where I need to access both the root state and a feature state from a component in a lazy loaded module. What would be…
3
votes
1 answer

How to reuse reducer with same action using redux-subspace

I'm building a small app using React, semantic-ui-react, redux-subspace. I have many different tables and when the user clicks on one of the cells, the value supposed to come out on the console but the result is undefined when it clicked. I'm trying…
3
votes
1 answer

When does a mapper store its output to its local hard disk?

I know that The output of the Mapper (intermediate data) is stored on the Local file system (not HDFS) of each individual mapper data nodes. This is typically a temporary directory which can be setup in config by the Hadoop administrator. Once the…
Neha Sharma
  • 295
  • 1
  • 2
  • 12
3
votes
0 answers

React Redux - Exception thrown by hook while handling onSetChildren

I'm having a strange error/warning at a reducer. If I set "stats" to the action's stats return value I get the error. GET_CUSTOMER_STATS_SUCCESS: (action, state) => ({getCustomerStatsInProgress: false, getCustomerStatsSuccess: true,…
Miguel Morujão
  • 1,131
  • 1
  • 14
  • 39
3
votes
2 answers

Redux - application state has the name of reducer as key

Could someone please help me with this problem? I've started to learn React and Redux but I'm stuck from a couple of days on configuring redux. I'm assuming that when something triggers an action, redux through the reducers stack of functions should…
Dario
  • 755
  • 1
  • 7
  • 19
3
votes
2 answers

How does combineReducers being provided with the right state slices

I am very new to Redux. I've been reading its' Reducers documentation, ran into their combineReducers function that I cannot seem to understand. They note: All combineReducers() does is generate a function that calls your reducers with the slices…
Kesem David
  • 2,135
  • 3
  • 27
  • 46
3
votes
1 answer

Composing higher order reducers in Redux

I've created some factory functions that give me simple (or more advanced) reducers. For example (simple one - base on action type set RequestState constant as a value): export const reduceRequestState = (requestTypes: RequestActionTypes) => …
user3008543
  • 153
  • 1
  • 6
3
votes
2 answers

Redux - Use action object method in reducer instead of switch

I'm new to redux and looked at redux-actions or using switch statements in reducer, and though I'm not against using a switch statement, I'm wondering, isn't it easier to just use the call the action method? Here's what I'm thinking import actions…
pedalpete
  • 21,076
  • 45
  • 128
  • 239