본문 바로가기

Reducer

(4)
소프트웨어 합성 : 트랜스듀서(Transducers) transducer를 이용한 효율적인 데이터 프로세싱을 배워봅시다. 다음 글의 번역입니다. https://medium.com/javascript-scene/transducers-efficient-data-processing-pipelines-in-javascript-7985330fe73d Transducers: Efficient Data Processing Pipelines in JavaScript Note: This is part of the “Composing Software” series on learning functional programming and compositional software techniques in… medium.com Transducer는 합성 가능한 고차 리듀서입니다. 리..
소프트웨어 합성 : 리듀서(reducer) reducer를 이용한 소프트웨어 합성에 대해 좀 더 알아봅니다. 다음 글의 번역입니다. https://medium.com/javascript-scene/reduce-composing-software-fe22f0c39a1d Reduce (Composing Software) Note: This is part of the “Composing Software” series (now a book!) on learning functional programming and compositional software… medium.com What is Reducer? 함수형 프로그래밍에서 일반적으로 사용되는 Reduce(일명: fold, accumulate) 유틸리티는 반복이 완료되고 누적된 값이 반환될 때까지 리스트를..
새로운 리액트 공식문서로 배우는 Reducer 원문 : https://beta.reactjs.org/learn/extracting-state-logic-into-a-reducer Extracting State Logic into a Reducer A JavaScript library for building user interfaces beta.reactjs.org Reducer reducer의 명칭은 배열의 reduce(누적) 연산에서 비롯되었습니다. reduce는 전체 배열을 다른 값으로 누적(reduce)합니다. 우리의 리듀서는 지금까지 변화해 온 상태와 액션을 취하고 다음 상태를 반환합니다. 우리의 리듀서는 시간이 지남에 따라 액션을 상태로 누적합니다. 리듀서는 상태 관리 로직을 추출하기 위해 사용합니다. useReducer를 사용하면 업데이트..
리액트 디자인패턴 : State Reducer Pattern (스테이트 리듀서 패턴) IOC : 제어의 역전 https://itchallenger.tistory.com/261?category=1063253 제어의 역전(IOC : Inversion of Control) in React 원문 보기 사용 중인 루틴에 기능을 추가해달라는 요청을 받게 되면? 리액트 컴포넌트는 props를 추가하고, 리액트 훅은 argument를 추가할 것이다. 구현 로직은 점점 복잡해진다. 이같은 조치는 다 itchallenger.tistory.com 자바는 익명 클래스의 메서드를 오버라이딩하여 파라미터로 넘기는 코딩이 있다. (요즘은 람다-문법적 설탕임.) 이는 특정 객체의 특정 메서드를 호출한다. 이는 js에서 콜백을 넘기는 것과 동일(isomorphic)하다. 제어의 역전이란 내 코드의 실행을 다른 API에..