NullVoxPopuli / ember-resources

An implementation of Resources. Supports ember 3.28+
https://github.com/NullVoxPopuli/ember-resources/blob/main/docs/docs/README.md
MIT License
91 stars 37 forks source link

Modelling side effects #988

Closed swastik closed 1 year ago

swastik commented 1 year ago

Do you have any thoughts on how we could model side effects of, say, a request completing?

e.g. if I want to transition to a different URL after a request finishes.

NullVoxPopuli commented 1 year ago

what code are you working with?

swastik commented 1 year ago

Thank you, that sounds good! In this case, will effects run only when the values they are autotracking (just value1 in that example) changes, or every time that template is rendered?

NullVoxPopuli commented 1 year ago

They'll run only whenever values change. The template as a whole is never rerendered. Only {{ }} zones are rerendered. (Fine grained reactivity! 🎉 )

swastik commented 1 year ago

Awesome, thank you!