Skip to content

is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ? #3896

Closed
@Eliav2

Description

@Eliav2

I want to use the undocumented property React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED which holds some interesting insights and can be useful in some cases.

I'm developing React libraries.

  1. is it safe to use in development?
    for example using React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current.type.displayName I could warn the user the name of the component that consumed a custom hook without wrapping it with required context.
  2. is it safe to use in production? for example this use case.

thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions