Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2266

Anyway to use createRealmContext and old fashion operation at once in react native?

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Realm React

      Hi,

      i want to know whether realm-react's RealmContext can return realm like

      const realm = await Realm.open({
      path: "realm-files/myrealm",
      schema: [TaskSchema],
      });

      like const realm.

      So that i can use in class. i want to use the realm in dataManager, where i do business logic there and save in regular fashion like
      realm.write(() => {
      task1 = realm.create("Task", {
      _id: 1,
      name: "go grocery shopping",
      status: "Open",
      });

      doing all logic in function component making file bigger.

      so that i can use useQuery for fetching and listening the data , useRealm for small changes as hooks in function component.

            Assignee:
            andrew.meyer@mongodb.com Andrew Meyer
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: