Replies: 1 comment 1 reply
-
You can reduce your example to simply properties vs computed properties. Computed properties have obvious advantages for maintainability, you have a single place where you have the logic but if it's quite expensive to read, often read and rarely written it might be more efficient to use the second approach. I'd say default to the first one. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature1 calculates navigationTitle and addButtonIsHidden dynamically using computed properties in the State struct.
Feature2 updates these properties explicitly within the reducer actions.
Which approach is more efficient and maintainable, and what are the potential benefits and drawbacks of each?
Beta Was this translation helpful? Give feedback.
All reactions