Updating state in reducer not propagating to Component

Updating state in reducer not propagating to Component

I am trying to update the redux state in a reducer. The updated state is not showing up in the component, even though the component is connected via a 'connect' call.

I am trying to update the redux state in a reducer. The updated state is not showing up in the component, even though the component is connected via a 'connect' call.

Here is the reducer code -

const INIT_STATE={fullData:[]}

export default createTaskReducer=(state=INIT_STATE,action)=>{ //console.log('from reducer') switch(action.type) { case "createTask":fullData=state.fullData;fullData.push(action.payload); return {...state,fullData}

case "delete":console.log("about to delete"); let allData=state.fullData.filter((value,index,arr)=>{return value.id!==action.payload});

state.fullData=allData; console.log(state); return {...state};

default: return {...state} }

}

As you can see in the above reducer, in 'delete' I am trying to remove some entries from the state, updating the state the with the modified data, then creating a new state object with the same details.

Here is my combinereducers -

export default combineReducers({
initial:dataList,
fullData:createTaskReducer,
latestId:generateId
})

After the reducer is called, the following component is called by redux because the state is changed. However, I am not getting the updated value of the 'fullData' property of the state -

      class TaskList extends React.Component{

    constructor(props)
    {
        super(props);
    }

    renderListItem(singleItem)
    {
      //console.log(singleItem);
     return <Task title={singleItem.item.title}  desc={singleItem.item.desc} 
    dueDate= {singleItem.item.dueDate} id={singleItem.item.id}/>
    }
    componentWillMount()
    {
        if(this.props.init)
        {this.props.loadInitialData();}
    }

    render()
    {    

       if (this.props.init)
       {this.props.fullData.fullData=this.props.initial.initialData}
        console.log('printing...')

//NOT GETTING THE UPDATED STATE HERE !! console.log(this.props);

let renderList=this.props.init?
this.props.initial.initialData:this.props.fullData.fullData;

  let list=(renderList.length==0?(<View></View>):<FlatList data={renderList}  renderItem={this.renderListItem} 
    keyExtractor={val=>val.id.toString()}></FlatList>);  



Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

An intro to Redux and how state is updated in a Redux application

I started learning Redux a few days back and it was an overwhelming concept for me at the start. After polishing my skills in ReactJS by making a&nbsp;<a href="https://github.com/aimenbatool/my-reads" target="_blank">personal book reading application</a>, I headed towards Redux to learn more about it.

React Boilerplates with Redux, Redux Saga and Best Practices

React Boilerplates with Redux, Redux Saga and Best Practices