タグ

Fluxに関するnature33のブックマーク (2)

  • VuexのStore設計のTips - 薄いGetter

    Vue + Vuexで中〜大規模なアプリケーションの開発をするとき、どんな設計にするか未だによく悩みます。試してみては捨ててを繰り返していて、そろそろ自分の中でベターなパターンを固めたいと思いつつも固まらず、気づけば数年経ちました。 そういった前提を踏まえつつではありますが、現時点で設計時に意識していることをTips的に少しずつまとめてみようと思います。今回はVuexのGetterに関するお話です。 Getterの役割を見直す 副作用のないクエリとして実装する プロパティアクセスとメソッドアクセスを区別して命名する プリミティブでシンプルなクエリとして実装する 表示用の加工処理はComponentに実装する 例外1. 加工された値の賞味期限が長い場合 例外2. 加工処理が複数Componentで繰り返される場合 おわりに Getterの役割を見直す VuexはFluxアーキテクチャを参考に

    VuexのStore設計のTips - 薄いGetter
  • A cartoon intro to Redux | by Lin Clark | Code Cartoons

    One thing that causes even more confusion than Flux is the difference between Flux and Redux, a pattern that was inspired by Flux. In this article I’ll explain the differences between the two. If you haven’t read the last article about Flux, you should do that first. Why change Flux?Redux solves the same problems as Flux, plus some. Just like Flux, it makes state changes in apps more predictable.

    A cartoon intro to Redux | by Lin Clark | Code Cartoons
  • 1