Back to Tldraw

Prevent instance changes

apps/examples/src/examples/events/prevent-instance-change/README.md

4.5.11270 B
Original Source

Prevent a change to the "instance" record that would turn off grid mode.


You can use Editor's side effects API to prevent certain changes from occurring in the instance state. In this example, we prevent the user from changing the instance's isGridMode property.