---
title: "set(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/ikcomponent/solvercollection/set(_:)"
---

# set(_:)

Updates the element with identifier matching the new value.

## Declaration

```swift
@discardableResult mutating func set(_ newValue: IKComponent.SolverCollection.Element) -> IKComponent.SolverCollection.Element?
```

## Parameters

- `newValue`: The new value to store.

## Return Value

Return Value The previous value if the identifier was found, nil otherwise.
