ConstExample Usage
const ns = createNamespace({ name: 'com.my-company' });
const element = createElement(ns, {
name: 'My Page With Buffer',
description: 'Page that allows controlling Retro Encabulators',
traits: [traits.BufferedChanges, traits.Page],
propsSchema: createPropsSchema().initial({}),
Component() {
return <div>My Page Content</div>;
},
});
Makes an element have the option for buffering changes locally.
Elements with this trait will:
The typical use case for this trait is to be used in combination with the PageTrait to create pages that allow users to make changes and apply them explicitly via a button (Action 'Commit & Write Buffered Changes').
Important: In this case, the order of the traits is crucial. The BufferedChangesTrait must always be listed before the PageTrait!