0

The state of my application is as follows:

body: { data: [], style: {}}}, block:{}

I have 2 separate reducers for data and style and no reducer for body. Am combining reducers in the following way:

const body = combineReducers({data, styles});
export default combineReducers({
    body,
    block
}) as Reducer<StoreState>;

Am passing the preloaded state as body: {data: [{'data1': 'dataValue1'}], style: {key: value}} The issue is the preloaded state is not reflecting correctly for body. If I give data and styles directly in combineReducers the preloaded data is reflected correctly. Am unable to understand what am I missing. What is the correct way to achieve this behavior?

jsdev
  • 101
  • 7

0 Answers0