Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Tools "Show Source" displays Class wrapper #1340

Closed
theKashey opened this issue Sep 11, 2019 · 1 comment
Closed

Dev Tools "Show Source" displays Class wrapper #1340

theKashey opened this issue Sep 11, 2019 · 1 comment

Comments

@theKashey
Copy link
Collaborator

theKashey commented Sep 11, 2019

You have clicked "Show Source" at Dev Tools, but they are displaying a class wrapper, instead of Component.render on Show Source action.

(function(InitialParent, postConstructionAction) {
  return class ${InitialParent.name || 'HotComponent'} extends InitialParent {

    constructor(props, context) {
      super(props, context)
      postConstructionAction.call(this)
    }
  }
})

Well, first of all - this is what RHL does, and this is how RHL works. However, you shall never face this issue, unless:


Another option - you might see "ProxyFacade", which is a wrapper for Functional Component

ProxyFacade = function(props, context) {
      /*

        ! THIS IS NOT YOUR COMPONENT !
        !  THIS IS REACT-HOT-LOADER  !

        And you are probably looking for a function component of yours
        It's hidden, but there is a way to fix this - just reconfigure your application a bit
        see https://github.com/gaearon/react-hot-loader/issues/1311

       */

      const result = CurrentComponent(props, context);

Treatment for this case is a bit different:

@theKashey
Copy link
Collaborator Author

Resolved in a new Dev Tools.

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

No branches or pull requests

1 participant