Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
reducer

4 Articles
{
,

}
Direct link to the article Understanding How Reducers are Used in Redux
react reducer redux state management

Understanding How Reducers are Used in Redux

A reducer is a function that determines changes to an application’s state. It uses the action it receives to determine this change. We have tools, like Redux, that help manage an application’s state changes in a single store so …

Avatar of Kingsley Silas
Kingsley Silas on Oct 24, 2019
Direct link to the article Getting to Know the useReducer React Hook
beginning react react hooks reduce reducer

Getting to Know the useReducer React Hook

useReducer is one of a handful of React hooks that shipped in React 16.7.0. It accepts a reducer function with the application initial state, returns the current application state, then dispatches a function.

Here is an example of how it …

Avatar of Kingsley Silas
Kingsley Silas on Jun 26, 2019 (Updated on Jul 6, 2019)
Direct link to the article An Illustrated (and Musical) Guide to Map, Reduce, and Filter Array Methods
arrays filter JavaScript map reducer

An Illustrated (and Musical) Guide to Map, Reduce, and Filter Array Methods

Map, reduce, and filter are three very useful array methods in JavaScript that give developers a ton of power in a short amount of space. Let’s jump right into how you can leverage (and remember how to use!) these super …

Avatar of Una Kravets
Una Kravets on Mar 26, 2019 (Updated on Apr 2, 2019)
Direct link to the article Understanding the Almighty Reducer
arrays JavaScript reduce reducer

Understanding the Almighty Reducer

I was recently mentoring someone who had trouble with the .reduce() method in JavaScript. Namely, how you get from this:

const nums = [1, 2, 3]
let value = 0

for (let i = 0; i < nums.length; i++) {
  
…
Avatar of Sarah Drasner
Sarah Drasner on Jun 13, 2018

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top