Created
November 11, 2016 15:27
-
-
Save josephan/214e142848c1e6d07ee3deb91efead4d to your computer and use it in GitHub Desktop.
react-native-device-info for React Native Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ReactNative; | |
using ReactNative.Modules.Core; | |
using ReactNative.Modules.RNDeviceInfo; | |
using ReactNative.Shell; | |
using System.Collections.Generic; | |
namespace AwesomeProject | |
{ | |
class MainPage : ReactPage | |
{ | |
public override string MainComponentName | |
{ | |
get | |
{ | |
return "AwesomeProject"; | |
} | |
} | |
#if BUNDLE | |
public override string JavaScriptBundleFile | |
{ | |
get | |
{ | |
return "ms-appx:///ReactAssets/index.windows.bundle"; | |
} | |
} | |
#endif | |
public override List<IReactPackage> Packages | |
{ | |
get | |
{ | |
return new List<IReactPackage> | |
{ | |
new MainReactPackage(), | |
new RNDeviceInfo(), | |
}; | |
} | |
} | |
public override bool UseDeveloperSupport | |
{ | |
get | |
{ | |
#if !BUNDLE || DEBUG | |
return true; | |
#else | |
return false; | |
#endif | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment