Redux,state can be modified without action

If the store status of

1.redux is a reference type, you can directly modify the store.getState (). Xxx.xxx=? Modify it directly;

    let state1 = {person: {name:"ss"}}
    
    function reduce(state = state1, action) {
        return {...state}
    }
    const store = Redux.createStore(reduce)
    
    console.log(store.getState()) // lisi
    let tempState = store.getState()
    tempState.person.name="lisi"
    console.log(store.getState()) // lisi

question: official documents make it clear that status can only be modified through action. Is it because state management uses incorrect scenarios? Ask for help.

Jun.26,2021

what is stored in store is ordinary Object,. You can modify the attribute value directly in this way.

the official document says that "state can only be modified through action" is more of a rule / constraint that aims to make the flow of data clear and predictable, rather than saying that errors will be reported in other ways, such as directly modifying object properties.

of course you can't trigger props updates in this way

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3eda0-2c43b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3eda0-2c43b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?