-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) Get rid of _source #272
Conversation
You might want to test this with the kind of tests I have in #269 replacing the call to |
`separate file for hot reloading to work.` | ||
); | ||
} | ||
var id = idsByType.get(type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will update the proxy even if createElement is called with stale type only if we additionally keep a typesById map and do var latestType = typesById.get(id)
after this line and use this latestType to update the proxy. Otherwise it doesn't solve the router problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason stale types were used is because Router cached old type
s and called createElement
with them. Now the only “entry point” to updating a proxy is an explicit __REACT_HOT_LOADER__
call. So router can’t revive old types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Should fix #266 and #249.
TODO:
global
npm package instead ofwindow
ReactDOM.render()
in the same file