Skip to content

Instantly share code, notes, and snippets.

View grittymindy's full-sized avatar

mindy grittymindy

View GitHub Profile
@grittymindy
grittymindy / gist:864a775911554c44e6d6
Last active August 29, 2015 14:25
react-native-hot-reload-proposal

##The basic proposal is:

  1. pack the js bundle within the app itself
  2. Each time you app is lauched, try to check with your server if your local js bundle need to be updated. If so, download the latest js bundle from your server, and save it into the sandbox. Say the destination path is DIR_FOR_JS.
  3. Your code loading js files should be like this:
    if(file exists in DIR_FOR_JS)
        load the file from DIR_FOR_JS
    else 
        load the file packed in your app