I am using data from a backend server (which I don't have control over), and the data is not reliable. For example, it's missing values for some fields, and sometimes has a wrong/unacceptable value for a certain field.
I need to sanitize this data on a frontend to make sure that the frontend app receives data of good quality and in an expected format.
Where is the best place to place such a logic to parse & convert data from the backend?
action creators- After fetching data from the backend usingfetchAPI, I cansanitizedata and dispatch an action withsanitizeddata.reducers- After receiving anunsanitizeddata, reducers can parse them before saving them into a store.
Which one is more acceptable - fat action creators or `fat reducers'?