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

Don't warn about shouldComponentUpdate from @observer'd superclass #476

Closed
wants to merge 1 commit into from

Conversation

kmdavis
Copy link

@kmdavis kmdavis commented May 17, 2018

This pull fixes the issue where the following is logged erroneously:

Use shouldComponentUpdate in an observer based component breaks the behavior of observer and might lead to unexpected results. Manually implementing sCU should not be needed when using mobx-react.

This warning is misleading and incorrect if the shouldComponentUpdate that is being complained about was added by @observer itself. e.g.

@observer
class GenericComponent extends Component {}

@observer // should not complain, but it does
class SpecificComponent extends GenericComponent {}

@mweststrate
Copy link
Member

Duplicate of #492, thanks for the effort though :-)

@mweststrate mweststrate closed this Jun 4, 2018
@github-actions github-actions bot mentioned this pull request Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants