Assuming state.text is a string, the reason this doesn't work is because primitive types are passed by value in javascript. It would be the same as doing
```
let text = state.text;
text = payload; // state.text still has its old value
^ What @BartCorremans said.
Thank you. i got it.
Most helpful comment
Assuming
state.textis a string, the reason this doesn't work is because primitive types are passed by value in javascript. It would be the same as doing```
let text = state.text;
text = payload; // state.text still has its old value