--[[
	Updates the value stored in this State object.

	If `force` is enabled, this will skip equality checks and always update the
	state object and any dependents - use this with care as this can lead to
	unnecessary updates.
]]

function class:set(newValue, force: boolean?)
	if force or not utility.isSimilar(self._value, newValue) then
		self._value = newValue
		Dependencies.updateAll(self)
	end
end

return Value
