Using mobx to update data problems

Code:

let appState = observable({
    time: 11,
    do:function(){
        appState.time=12
    }
});
const App = observer(class app extends React.Component { 
componentDidUpdate(){
    console.log("1")
}
render(){
  return (<h2 onClick={appState.do}>Home{appState.time}</h2>;
}
  
})
ReactDOM.render(
  <App/>,
  document.body
);

does not actually update to data using action decorations, using action decorations:

let appState = observable({
     time: 11,
     do: action(function () {
     appState.time = 12;
})
    })

action is equivalent to setState. Why is action still updated without enabling it

Jun.08,2022

appState.time= returned by

observable is already a setter, and triggering reaction is normal

.

I guess you didn't turn on strict mode ( enforceActions )

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-1c22ea8-33648.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-1c22ea8-33648.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?