Realm-js: Support for ReactNative for Windows

Created on 13 May 2016  路  26Comments  路  Source: realm/realm-js

After speaking with Tim Oliver, it was suggested I post here a request for support of React Native on Windows Mobile.

While Windows support for ReactNative is still in development, it is coming soon, and was worthy an announcement at the Facebook F8 conference.

It would be nice to see Realm as a part of this expansion.

O-Community Pipeline-Idea-Backlog T-Feature

Most helpful comment

react-native-windows definitely needs Realm support

All 26 comments

This is definitely on our radar

+1
Might be nice to have it, since you need some persistent data storage.

+1
Any news about this topic? React Native Windows is definitely missing Realm.

+1

+1

+1

+1

+1

+1

+1

+1, and I'd love to help out with this. I actually just tweeted about this as well - would love to chat further.

@rozele Feel free to reach out to me at [email protected] for a chat.

+1

Would the existing realm-dotnet repository be of any use for supporting react-native for windows? I imagine much of the C# code will be similar

Any news on this topic?

@Traviskn i don't think so. i'm just struggling to install realm for react native windows. I managed to use realm in a C# UWP app, using the realm nuget package. I was also able to put that package in the react-native-windows generated .sln and use it from within the launching project from c#. But it's not working from javascript side.
Whenever android react native links realm, it adds a line into MainApplication.java:
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RealmReactPackage() ); }
besides of course adding the realm dependency to gradle.
I was thinking something similar has to be done for the react-native-windows project as well:

    class MainReactNativeHost : ReactNativeHost
    {
        public override string MainComponentName => "testPrj";

#if !BUNDLE || DEBUG
        public override bool UseDeveloperSupport => true;
#else
        public override bool UseDeveloperSupport => false;
#endif

        protected override string JavaScriptMainModuleName => "index";

#if BUNDLE
        protected override string JavaScriptBundleFile => "ms-appx:///ReactAssets/index.windows.bundle";
#endif

        protected override List<IReactPackage> Packages => new List<IReactPackage>
        {
            new MainReactPackage(),
        };
    }

As you can see it has the same structure as the android app, and some line would be needed below new MainReactPackage(), for new RealmReactPackage().
Unfortunately the Realm .NET nuget package does not contain such an object.

Any update on this ?

Any update on when realm will have support for react-native-windows?

@bmunkholm Did your chat with @rozele have any outcomes?

@creambyemute Nope - I never heard anything.

@alazier, any chance of moving this forward? MS has put recently great effort on renewing the React Native for Windows and it would be great to be able to use Realm as the database for the Windows apps built on React Native. @rozele do you know if there are any plans on your side?

anyone managed to make Realm work with react-native-windows ?

react-native-windows definitely needs Realm support

Would be great to see this working with react-native-windows

+1 for this. This would be a great feature.

+1 for this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ashah888 picture ashah888  路  3Comments

kevinnguy picture kevinnguy  路  3Comments

max-zu picture max-zu  路  3Comments

jmartindivmedianet picture jmartindivmedianet  路  3Comments

MihaelIsaev picture MihaelIsaev  路  3Comments