Generally when props change the component updates automatically, but there are some cases when there’s some dependant data that needs to be updated manually whenever the props change (using watchers, for example). Is it critical that devs always make sure that all of these changes are handled, even if the component at hand is used in such a way that it isn’t important at this point in time?
One common example is calculating something depending on prop values inside the
created() lifecycle hook. Because this calculation only happens in those hooks, if the values of the props change afterwards, the calculation isn’t going to occur again and the component could go into an invalid state.
The keyword here is - could. These components still work in the specific scenarios where they’re used. For example, a dev knows that the props aren’t going to be updated or he knows that the only way the props can be different is if the component gets re-created from scratch (having different props means that the user went back to some previous UI that didn’t have this component).
So is it important to prepare a component to always work in all possible scenarios handling all possible prop changes (future-proofing it), or is it fine to leave it as it is if you know it’s not going to run into those issues for the time being?