I have this saga being called when opening a page with two console.log in to debug. This gives me two logs supposed to be similar. The values in data[0] is used in a AgGrid table. Two fields are editable in the table, these are null on the network call. However if i edit the fields in the browser, before expanding the console.log the value now shows as whatever i entered into the field. This will happen on either of the logs, so it can log the field as null first and then a value after.
function* saga({ Id }) {
try {
const response = yield call(get, GET_DATA(Id));
console.log(response.data[0]);
console.log(response.data[0]);
yield put(fetchDataSuccess(response.data));
} catch (error) {
yield put(displayErrorMessage(NOB.ERROR));
}
}
Are console.log supposed to be able to change after being printed if what is references change? That would somewhat reduce how efficient it is for debugging.