Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Realm, React Native embedded object example

$
0
0

I'm looking for any concrete examples of using realm with React Native + TypeScript using embedded objects.

Usually you can provide a partial object of properties to send to realm for CRUD operations:

realm.write(() => {  realm.create<SomeSchemaObject>(    SchemaObject.schema.name,    {        id: 1,        someListType: ??? // where someListType is an embedded schema object.    },    UpdateMode.Modified  )}

With typescript and providing say an array of partial properties for the embedded object, I get type errors. I've scoured the Realm-JS repo and the documentation, but there don't seem to be any examples of using typescript and embedded objects.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>