You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When code got replaced we are registering new classes, and merging the new code with the old one.
This includes hacking into class instances, to replace methods on the fly.
There is 4 types of methods:
methods - variables. We just copy new values
methods - arrow functions. We will use eval, injected by babel, to update them.
bounds methods. Ie this.fn = this.fn.bind(this).
anything else.
1 - ok, 2 - ok, as long babel will handle it, 4 - ok, as long we dont care.
But 3 - is a problem.
Basically, we could not detect the change, it is always "native code", and always trying to update these methods. But the current logic is still bound to eval. Which is not a thing for code from node_modules.
As result - react-redux will emit a warning on each update.
Possible solutions:
hack class prototype and override .bind of every method, to get control over it.
do nothing, as long code from node_modules could not change, and there is no need to inject the new version of a method.
Proposed solution:
as long client code is always covered by babel, and non-client code is always not - just remove the warning. Don't do anything else.
The text was updated successfully, but these errors were encountered:
When code got replaced we are registering new classes, and merging the new code with the old one.
This includes hacking into class instances, to replace methods on the fly.
There is 4 types of methods:
1 - ok, 2 - ok, as long babel will handle it, 4 - ok, as long we dont care.
But 3 - is a problem.
Basically, we could not detect the change, it is always "native code", and always trying to update these methods. But the current logic is still bound to
eval
. Which is not a thing for code from node_modules.As result - react-redux will emit a warning on each update.
Possible solutions:
Proposed solution:
The text was updated successfully, but these errors were encountered: