---
title: defaultValue
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/preferencekey/defaultvalue
---

# defaultValue

The default value of the preference.

## Declaration

```swift
static var defaultValue: Self.Value { get }
```

## Discussion

Discussion Views that have no explicit value for the key produce this default value. Combining child views may remove an implicit value produced by using the default. This means that reduce(value: &x, nextValue: {defaultValue}) shouldn’t change the meaning of x.

## See Also

### Getting the default value

- [Value](swiftui/preferencekey/value.md)
