How to build an immutable "deep-set" function in javascript
Автор: Tanner Linsley
Загружено: 2019-09-16
Просмотров: 444
Описание:
Immutability and related patterns are extremely helpful in JS, especially in the React ecosystem. But before you go jumping for a tool like ImmerJS or Immutable, let me show you how you can build (and understand) your own immutable deep-set function!
Highlights:
Using strings to parse, read, and even create javascript objects recursively
Handling recursive immutability in vanilla javascript
Accessing old values using the callback pattern (just like setState!)
CodeSandbox URL: https://codesandbox.io/s/prod-surf-ywrlq
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: