For example, in FluidFramework/examples/data-objects/badge/src/BadgeClient.tsx:
const changeSelectedOption = (newItem: IBadgeType): void => {
if (newItem.key !== model.currentCell.get().key) {
const len = model.historySequence.getItemCount();
model.historySequence.insert(len, [
{
value: newItem,
timestamp: new Date(),
},
]);
model.currentCell.set(newItem);
}
};
Does the history-insertion op always succeed/fail together with the cell-setting op?