Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

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

Closed
zengqingzhuang opened this issue Jul 27, 2020 · 7 comments
Closed

Comments

@zengqingzhuang
Copy link

image

@danielkcz
Copy link
Contributor

Please create a small reproduction.

@joelharkes
Copy link

joelharkes commented Jul 27, 2020

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);

ynejati added a commit to ynejati/mobx-react that referenced this issue Jul 27, 2020
…ssage should get display name from 'target' and not 'this'
@joelharkes
Copy link

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

@mweststrate
Copy link
Member

mweststrate commented Jul 27, 2020 via email

@bigdrum
Copy link

bigdrum commented Jul 28, 2020

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.

@danielkcz
Copy link
Contributor

danielkcz commented Jul 28, 2020

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

danielkcz pushed a commit that referenced this issue Jul 28, 2020
#888)

* Issue #887: already defined observer class component warning message should get display name from 'target' and not 'this'

* Update changelog
@mweststrate
Copy link
Member

Just release 6.2.4. Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants