Question: I am working on a solution to have an offline approval process between client and server application. If the client is not able to connect to server due to network is down, then server should be able generate a key which will be passed to the client manually by a user. The client should be able to verify code.

Any idea how it could be done?

Answer: 
There is not need to use a static reference to ReactInstanceManager; you can obtain it by calling `getReactNativeHost().getReactInstanceManager()`.
I solved this tentatively by saving a static reference to the `ReactInstanceManager` on the `MainActivity` class, and adding a `public static getContext()` method. It doesn't feel right, but it seems to work. 

```
public final class MainActivity extends ReactActivity {

    private static ReactInstanceManager sReactInstanceManager = null;

    /* [...] */

    @Override
    protected ReactInstanceManager createReactInstanceManager() {
        ReactInstanceManager manager = super.createReactInstanceManager();
        sReactInstanceManager = manager;
        return manager;
    }

    public static ReactContext getContext() {
        if (sReactInstanceManager == null){
            // This doesn't seem to happen ...
            throw new IllegalStateException("Instance manager not available");
        }
        final ReactContext context = sReactInstanceManager.getCurrentReactContext();
        if (context == null){
            // This really shouldn't happen ...
            throw new IllegalStateException("React context not available");
        }
        return context;
    }

    /* [...] */
}

```

`createReactInstanceManager()` is called by `ReactActivity`'s `onCreate()` method, so I presume it's safe to assume that `sReactInstanceManager` will point to the correct instance, but don't take my word for it.