Skip to main content

LockValue

Locks a Seam value state, disconnecting it from the reactive backend and preventing future writes.

TypeSinceScoped
Utility0.3.3No

Constructor

LockValue(Value : Seam.ValueInstance)

Usage

This utility locks a Seam value state. Upon doing so, the following happen:

  • All reactivity relating to the value is removed
  • All future writes to Value.Value will throw an error

Here is an example of this in action:

local Value = Seam.Value
local LockValue = Seam.LockValue

local MyTestValue = Value("Peach")

MyTestValue.Value = "Starfruit" -- No error

LockValue(MyTestValue)

MyTestValue.Value = "Kiwi" -- Throws an error, it's locked