Should I use Redux for my feature?

Yes, if some of the following are true:

  • The feature is new

  • The feature is self-contained. For example, the models it uses don't need to be tightly synced to other EmberData features. If not, see Maybe below.

  • You're building off of an existing Redux feature.

  • Has significant local state. Red flags: you see controller.set and references to this all over the place. Especially important if those are contained in tricky conditionals.

  • Has had tricky state or async related bugs in the past

  • Is cross platform or will be (web + mobile)

  • Requires excessive testing due to mutation possibilities

  • Requires excessive testing to cover async race conditions

Maybe

The feature is existing, but has some overlap with Ember Data. Depending on how the models are fetched and used in both features, we may need to do some manual synchronization between Ember Data and Redux. In this case, it might make more sense to take on the smaller of the two features first.

We don't expect to be in a situation where large portions of the codebase need to be transitioned at once. However, in the meantime we may load some redundant data—once for a Redux based route and again if the user transitions to an Ember Data based route that uses the same data. And we may have to write some synchronization to mitigate this.

Not yet

  • The feature is not expected to see significant changes in the coming year
  • The feature is expected to undergo a major redesign in the future
  • The feature uses external components which are deeply coupled to Ember Data.
  • Features making heavy use of form validation libraries. We haven't yet established guidance on this as of this writing.

results matching ""

    No results matching ""