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
Currently, each effect file in the store is mapping the data from the service calls into the shape we want for the state. We'd like to refactor these mappings out into their own file, and let the effects use the mapping to help the effects look cleaner.
You can see an example of this in the state/user file - a user.mapping.ts file has been created with the mapping functions, and then the user.effects.ts file is using those mappings. This ticket will cover the work to do the same thing in the other state files - create a .mapping.ts file to hold the functions, and update the related effect to use those functions.
If an effect's mapping is 3 lines or less, that can likely stay in the effect. If it's larger or more deeply nested than that, please create a mapping function for it.
The text was updated successfully, but these errors were encountered:
Currently, each effect file in the store is mapping the data from the service calls into the shape we want for the state. We'd like to refactor these mappings out into their own file, and let the effects use the mapping to help the effects look cleaner.
You can see an example of this in the
state/user
file - auser.mapping.ts
file has been created with the mapping functions, and then theuser.effects.ts
file is using those mappings. This ticket will cover the work to do the same thing in the other state files - create a.mapping.ts
file to hold the functions, and update the related effect to use those functions.If an effect's mapping is 3 lines or less, that can likely stay in the effect. If it's larger or more deeply nested than that, please create a mapping function for it.
The text was updated successfully, but these errors were encountered: