You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Immutability should be a key principle. Wherever possible, data should remain immutable, leveraging types like `Readonly` and `ReadonlyArray`.
118
118
119
-
Using readonly type prevents accidental data mutations and reduces the risk of bugs caused by unintended side effects.
119
+
Using readonly types prevents accidental data mutations and reduces the risk of bugs caused by unintended side effects. This ensures that data integrity is maintained throughout the application lifecycle.
120
120
121
121
When performing data processing always return new array, object etc. To minimize cognitive load for future developers, aim to keep data objects flat and small.
122
122
Mutations should be used sparingly and only as an exception in cases where they are truly necessary, such as when dealing with complex objects, performance-related reasons etc.
0 commit comments