{"action":"created","issue":{"url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/22","labels_url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/22/comments","events_url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/22/events","html_url":"https://github.com/capaj/jspm-hot-reloader/issues/22","id":119180730,"number":22,"title":"Discussion: hot reload by overriding exported members?","user":{"login":"peteruithoven","id":523210,"avatar_url":"https://avatars.githubusercontent.com/u/523210?v=3","gravatar_id":"","url":"https://api.github.com/users/peteruithoven","html_url":"https://github.com/peteruithoven","followers_url":"https://api.github.com/users/peteruithoven/followers","following_url":"https://api.github.com/users/peteruithoven/following{/other_user}","gists_url":"https://api.github.com/users/peteruithoven/gists{/gist_id}","starred_url":"https://api.github.com/users/peteruithoven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peteruithoven/subscriptions","organizations_url":"https://api.github.com/users/peteruithoven/orgs","repos_url":"https://api.github.com/users/peteruithoven/repos","events_url":"https://api.github.com/users/peteruithoven/events{/privacy}","received_events_url":"https://api.github.com/users/peteruithoven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-27T11:27:52Z","updated_at":"2015-11-28T16:01:58Z","closed_at":null,"body":"Like capaj explains in https://github.com/capaj/jspm-hot-reloader/issues/17#issuecomment-160110062 the hot reloader currently also reloads all modules that use a module that is changed. \r\nBut is this really necessary? Could we for example override all exported members (functions / classes) with the members of the new version? \r\nOne thing that's probably tricky (if not impossible) are primary variables (numbers, strings etc). \r\nMaybe we could implement \"proxy's\", like Dan Abramov explains in his talk: https://youtu.be/xsSnOQynTHs\r\n\r\nThis feature should improve editing stateless functions, like Redux reducers. Since in Redux reducers are used to create the store (state), because they define the initial state of their part, they can't be reloaded without also reloading the state.  "},"comment":{"url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/comments/160314614","html_url":"https://github.com/capaj/jspm-hot-reloader/issues/22#issuecomment-160314614","issue_url":"https://api.github.com/repos/capaj/jspm-hot-reloader/issues/22","id":160314614,"user":{"login":"veggiemonk","id":5487021,"avatar_url":"https://avatars.githubusercontent.com/u/5487021?v=3","gravatar_id":"","url":"https://api.github.com/users/veggiemonk","html_url":"https://github.com/veggiemonk","followers_url":"https://api.github.com/users/veggiemonk/followers","following_url":"https://api.github.com/users/veggiemonk/following{/other_user}","gists_url":"https://api.github.com/users/veggiemonk/gists{/gist_id}","starred_url":"https://api.github.com/users/veggiemonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veggiemonk/subscriptions","organizations_url":"https://api.github.com/users/veggiemonk/orgs","repos_url":"https://api.github.com/users/veggiemonk/repos","events_url":"https://api.github.com/users/veggiemonk/events{/privacy}","received_events_url":"https://api.github.com/users/veggiemonk/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T16:01:58Z","updated_at":"2015-11-28T16:01:58Z","body":"@peteruithoven Thank you very much, I will give it try but the idea is quite neat...\r\nI was thinking to approach the issue by saying 'if this file change, only reload this one'\r\nbut now it's more like: 'here is the data to persist across (any) reload' which is much more powerful.\r\n\r\nDo you have any idea on:\r\n- how to extract the store from the old modules ?\r\n- how to inject the store into the new modules ?\r\n\r\nThe goal here would be to modify the code as little as possible in order to keep this a dev feature, meaning configurable so no extra dev code is shipped to production\r\n\r\nI would love this to be just a parameter object that could be pass from `config.js` but that would be for the next iteration."}}