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

inject HOC display name #466

@SimeonC

Description

@SimeonC

Before running around creating PR's everywhere I thought I'd ask why the inject HOC has a non-standard display name wrapper?

mobx-react/src/inject.js

Lines 37 to 43 in ab90ae6

let displayName =
"inject-" +
(component.displayName ||
component.name ||
(component.constructor && component.constructor.name) ||
"Unknown")
if (injectNames) displayName += "-with-" + injectNames

Currently this means when we debug we get a wrapper like inject-Component or inject-Component-with-storeA. This is inconsistent with the rest of the HOC components like observer(Component).

Why isn't inject using displayName like inject(Component) or inject-with-storeA(Component)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions