ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

One Cool Trick to Simplify Your Reducers

Автор: Eric Elliott

Загружено: 2020-06-04

Просмотров: 8593

Описание: Redux is an amazing tool if you take the time to get to know it. One of the things about Redux that commonly trips people up is that reducers must be pure functions.

A pure function is a function which:
Given same arguments, always returns the same result, and
Has no side-effects (e.g., it won't mutate its input arguments).

The problem is that sometimes a reducer needs to make a complicated change to some input state, but you can't just mutate the state argument without causing bugs.
The solution is a handy tool called Immer. In this video, I'll introduce you to Immer and show you how to use it to reduce the complexity of your reducer code. With one or two small reducers, the difference is pretty subtle, but on a large project, it can significantly simplify your application code.

Blog post with source code:   / one-cool-trick-to-simplify-reducer-functions  
Immer on GitHub: https://github.com/immerjs/immer

Resources for JavaScript developers:

DevAnywhere - Live, remote 1:1 mentorship subscription: https://DevAnywhere.io
EricElliottJS.com - Learn TDD, functional programming, software design principles and JavaScript with online, interactive lessons. https://ericelliottjs.com
Composing Software eBook: https://leanpub.com/composingsoftware
Composing Software paperback: https://amzn.to/3biid58
Follow me on Twitter   / _ericelliott  
Follow JS_Cheerleader on Twitter:   / js_cheerleader  

---
Eric Elliott is the author of the books, “Composing Software” and “Programming JavaScript Applications”. As co-founder of EricElliottJS.com and DevAnywhere.io, he teaches developers essential software development skills. He builds and advises development teams for crypto projects, and has contributed to software experiences for Adobe Systems, Zumba Fitness, The Wall Street Journal, ESPN, BBC, and top recording artists including Usher, Frank Ocean, Metallica, and many more.

He enjoys a remote lifestyle with the most beautiful woman in the world.

#JavaScript #ReactJS #Redux #Code

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
One Cool Trick to Simplify Your Reducers

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

JavaScript Quick Tip   Fetch in Parallel

JavaScript Quick Tip Fetch in Parallel

The Secret of Simple Code

The Secret of Simple Code

Копия Miro с нуля на React в 2025 + Архитектура front-end БЕЗ FSD!

Копия Miro с нуля на React в 2025 + Архитектура front-end БЕЗ FSD!

The Best React State Management Solution Has Been There All Along

The Best React State Management Solution Has Been There All Along

The Missing Introduction to React

The Missing Introduction to React

Event Loop от А до Я. Архитектура браузера и Node JS. Движки и рендер. Самое подробное видео

Event Loop от А до Я. Архитектура браузера и Node JS. Движки и рендер. Самое подробное видео

Паттерн, который должен знать каждый

Паттерн, который должен знать каждый

Выравнивание — БАЗА быстрого кода! Почему это важно знать | CPU Memory 2

Выравнивание — БАЗА быстрого кода! Почему это важно знать | CPU Memory 2

Nest.js — лучший бэкэнд фреймворк | Полный курс 2025

Nest.js — лучший бэкэнд фреймворк | Полный курс 2025

What It's Like To be a Computer: An Interview with GPT-3

What It's Like To be a Computer: An Interview with GPT-3

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]