birdofpreyru/react-native-static-server

Add native methods to obtain the currently running service

ShaoGongBra opened this issue · 3 comments

For example, when I use react native code push together, it will restart the entire JS, causing the loss of variables in the JS, but the native service will still be running

@ShaoGongBra why don’t you just terminate the server before the JS engine reset, and start a new one after? What you ask can be implemented, but requires extra work, and so far I don’t see much benefit, especially for a general use case.

I do indeed operate in this way now, but I have found that sometimes stopping the service is slow on Windows

Well, Christmas present — «Connecting to an Active Server in the Native Layer» in v0.10.1. I believe, it should get you covered, though I have not tested it end-to-end, thus might need some minor fixes.