Meteor enhancement request - better support for higher-order functions and logging


#1

The error reporter/console logging kinda doesn’t work that great when using higher-order functions to wrap React components:

Error: ReferenceError: draftStyle is not defined
    at RadiumEnhancer.render (http://localhost:3000/app/app.js?hash=3af60f2b7aef8893508eb0071ad984544cf33e47:1656:20)
    at RadiumEnhancer.render (http://localhost:3000/packages/modules.js?hash=036a323d4139953ad4fcaad1ded70269ba4e2d6e:151531:65)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (http://localhost:3000/packages/modules.js?hash=036a323d4139953ad4fcaad1ded70269ba4e2d6e:16814:34)

It would be handy if it could detect components that are wrapped, and dig in one or two levels deeper to get the actual component names and line numbers. Higher-order functions are replacing mixins, and IMO Meteor absolutely has to be able to handle them. Things can get pretty deep, level wise, too:

export default muiThemeable()(Radium(MyComponent))