Define a Default Property Value - React Native SDK
On this page
Overview
To define a default value, set the value of the property to an object with a
type
field and a default
field.
Example
The following Car
object schema specifies a default value of 0
for
the miles
property:
const CarSchema = { name: "Car", properties: { make: "string", model: "string", miles: { type: "int", default: 0 }, }, };