I am trying to use **realm-js** in **react-native** so what I did is created a class of realm-js in my action folder as in **LoginActions.js**, which will write the data after user logs in.

**My Question is How do I open the same schema into another .js file?**

Realm-js Defined in LoginActions.js:

```
class Login {
  get token() {
    return this.token;
  }
}

Login.schema = {
  name: 'Login',
  primaryKey: 'id',
  properties: {
    id: 'int',
    token: 'string',
  }
};

```

Then I Open the Realm to Write and Update in this Schema with Some of my functions. 

Like: 

```
// If Login User Success
Realm.open({ schema: [Login] })
.then(realm => {
  realm.write(() => {
    realm.create('Login', { id: 1, token });
  });
});

```

Now If want to Open this Schema into Another .js File. How will I Open it?
The Main Format that I want is like in Loading.js:

```
import ????? from ????;

```

OR

```
Realm.open(????????)
.then(realm => {
  realm.write(() => {
    const isUser = realm.create('Login', { id: 1, token }, true);
    if(isUser.length == 1) {
        // User Logs In Directly to Main Screen
    } else {
        // Show them Login Screen
    }
  });
});

```