Make sure the app doesnt get the wrong published JS

I have an app in production called demo, it has some native code in it and a lot of JS code.

Now I add new native code and then write JS code to interact with that code.

I want to now put my new project in the store however if I publish this new JS code all the projects that existed before this will break if they do not update. The new JS will come automatically but the new native code will only come if they go to the store and update.

How do I keep the old native code only running the old JS bundle and then once they update they get the new JS code?

I hope this question is clear

Short story: you can use release channels to keep new bundles from hitting old binaries. Each binary will only download code where the release channel matches.

Longer story: I detail how we solve the exact problem you describe by incorporating the build number into our release channels here: How to check compatibility of OTA updates with custom native modules

thanks this is an excellent solution