mobxjs / mobx-react

React bindings for MobX

Home Page:https://mobx.js.org/react-integration.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upgrade mobx-react version from 6.2.2 to 6.2.3,There is an error

zengqingzhuang opened this issue · comments

Please create a small reproduction.

Yes have the same issue:

image

We provide same component twice, because we use it for different stores, now it starts throwing errors. its quite annoying i had to downgrade to keep it working.

reproducable by calling observer() twice on same class method but doing it manually:

var observedClass1 = observer(ClassName);
var observedClass2 = observer(ClassName);

It would be nice to at least be able to disable this error/warning.

The warning is fine. The real problem is getDisplayName (

const displayName = getDisplayName(this)
) is passed with a undefined value; and it is not properly handled.

We will publish a fix soon, it was merely an oversight. Stick to the previous version for now, please.

Just release 6.2.4. Thanks for reporting!