Publish to my blog (weekly)

Where to Fetch Data: componentWillMount vs componentDidMount There are two common places to fetch data:      componentWillMount   componentDidMount In practice, componentDidMount is the best place to put calls to fetch data , for two reasons: Reselect로 React와 Redux 성능 향상시키기 – 불펌 오역 블로그 이것이 의미하는 바는 getItemsWithTotals가 처음 실행될 때는 계산된다는 것이다. 만약 다시 한번 같은 함수가 불렸는데 입력(getItems의 결과)이 변경되지 않았다면, items와 합계에 대해 캐시된 계산 결과를 리턴할 것이다. 만약 아이템이 수정되었다면( 아이템이 추가되거나, 수량이 변경되거나, getItems의 결과에 영향을 주는 어떤 일이든), 함수는 다시 실행될 것이다. Posted from Diigo . The rest of my favorite l...

Publish to my blog (weekly)

8 Best ReactJS Admin Templates For Your Next Project | AZMIND 5. Angle – Bootstrap Admin Template Top 10: Best Premium ReactJS Admin Templates | Our Code World 9. SPIN 8. Beyond Admin 3. Rubix Inspinia Bootstrap 3+ Framework ReactJS Posted from Diigo . The rest of my favorite links are here .

Publish to my blog (weekly)

함수형 setState가 리액트(React)의 미래이다(Functional setState is the future of React) | vobour 보버 - 블로그형 SNS 그의 트윗을 유의해서 보자. 함수형   setState 쓸 때 ... 업데이트는 큐(queue)에 쌓이고 추후에 호출 된 순서대로 실행된다.  따라서 리액트가 객체를 머지(merge)하는 대신 "여러 함수형 setState 호출"를 만나면 (물론 머지 할 객체가 없다) 리액트는 "호출 된 순서대로"함수를 큐에 넣는다.  그 후 리액트는 "큐(queue)"의 각 함수를 호출하여 상태를 업데이트하고 이전 상태, 즉 첫 번째 함수형 setState () 호출 이전 상태를 전달한다 (첫 번째 함수형 setState () 인 경우).  만약  첫 번째 함수형 setState () 호출이 아니라면,  큐 내의 이전의 함수형 setState () 호출로부터 최신 갱신된 상태를 전달한다.  [React.JS] 강좌 5편 컴포넌트의 State 와 Props 사용하기 | VELOPERT.LOG parent 컴포넌트에서 child 컴포넌트로 데이터를 전할 때, props 가 사용됩니다. ...

Publish to my blog (weekly)

Higher-Order Components - React Concretely, a higher-order component is a function that takes a component and returns a new component. Whereas a component transforms props into UI, a higher-order component transforms a component into another component. HOCs are common in third-party React libraries, such as Redux's connect and Relay's createContainer . // This function takes a component...   function withSubscription ( WrappedComponent , selectData ) {   // ...and returns another component...   return class extends React . Component {   constructor ( props ) {   super ( props );   this . handleChange = this . hand...

Publish to my blog (weekly)

Read Me · Redux 상태는 평범한 객체나 배열이면 충분히 다룰 수 있지만 리듀서에서 상태를 변경하지 않는 것을 강력히 권장합니다. 스토어나 리듀서는 애플리케이션 코드가 직접 데이터를 조작하는 대신 액션이라고 불리는 평범한 객체로만 모든 데이터 변화를 묘사하도록 강제합니다. 리듀서에서는 항상 새로운 객체를 반환해야합니다. Flux와 또 다른 중요한 차이점은 Redux는 당신이 결코 데이터의 상태를 바꾸지 않는다고 가정한다는 점입니다 . 순수하지 않은 리듀서 구현은 시간 여행, 기록/재생, 핫 로딩과 같은 개발 지원 기능을 망가뜨립니다. Tutorial: Intro To React - React A component takes in parameters, called props ...

Publish to my blog (weekly)

pattern matching - Scala: How to use case keyword without match keyword? - Stack Overflow It's just syntactic sugar. In scala, you can use any method that takes a single parameter as a binary operator. scala - How to serialize/deserialize case classes to/from Json in Play 2.1 - Stack Overflow Json combinators doesn't work for single field case class in Play 2.1 (it should be possible in 2.2) case class MyType ( value : String )   val myTypeRead = ( __ \ 'value ). read [ String ]. map ( v => MyType ( v )) // covariant map ...