Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating Mongodb Atlas Realm #158

Open
saimirg opened this issue Aug 24, 2023 · 5 comments
Open

Integrating Mongodb Atlas Realm #158

saimirg opened this issue Aug 24, 2023 · 5 comments
Assignees

Comments

@saimirg
Copy link

saimirg commented Aug 24, 2023

Hi,
could you please advice how to integrate Realm library into flexn/create ? I installed the latest stable version of flexn-io/create with the demo app template, and included the realm library, but its generating errors.

Here is the code:

import React from 'react';
import Realm from 'realm';
//import * as Realm from "realm-web";

import { App, Debugger } from '@flexn/create';
import { LogBox } from 'react-native';
import { ThemeProvider } from '../config';
import Navigation from '../navigation';

const realmApp = new Realm.App({ id: my-app-id });


LogBox.ignoreAllLogs();

const MyApp = () => (

    <ThemeProvider>
        <App style={{ flex: 1 }}>
            <Navigation />
            <Debugger />
        </App>
    </ThemeProvider>


);

export default MyApp;

This is the error message i get.
image

I also tried adding it at the plugin file but no success:

 "plugins": {
        "realm": {
            "version": "0.1.0",
            "android": {
              "package": "io.realm.react",
              "path": "node_modules/realm/android"
            }

        }

    },
@pauliusguzas pauliusguzas self-assigned this Aug 28, 2023
@pauliusguzas
Copy link
Collaborator

@saimirg thanks for reporting this, did you try to remove Realm and test? did the issue not occur again?

@saimirg
Copy link
Author

saimirg commented Sep 1, 2023

@pauliusguzas yes, it runs fine when removing realm.
I think integrating react/realm will be a great benefit as it will minimize the need of a backend.

@pauliusguzas
Copy link
Collaborator

pauliusguzas commented Sep 1, 2023

@saimirg thanks, please write down versions of rnv, node, create, os, renative.json and package.json, this will be checked

@saimirg
Copy link
Author

saimirg commented Sep 1, 2023

@pauliusguzas Please find details below:

image

ReNative Version: 0.37.3 │
│ Project Name ($package.name): rnvrealmtest │
│ Project Version ($package.version): 0.1.0 │
│ Workspace ($.workspaceID): rnv │
│ Platform (-p): androidtv │
│ Engine ($.platforms.androidtv.engine): engine-rn-tvos │
│ Template: @flexn/[email protected]
│ App Config (-c): app │
│ Build Scheme (-s): debug │
│ Target (-t): Android_TV_720p_API_22 │
│ Supported Platforms: android, androidtv, firetv, androidwear, │
│ ios, web, macos, tvos, tizen, webos │
│ Env Info: darwin | x64 | node v16.16.0

@saimirg
Copy link
Author

saimirg commented Oct 28, 2023

@pauliusguzas is it possible to use realm as local database ?
What other local database would you recommend using ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants