drcmda / react-contextual

🚀 react-contextual is a small (less than 1KB) helper around React 16s new context api
MIT License
642 stars 23 forks source link

React component tree renders <Unknown> wrappers #7

Closed amite closed 6 years ago

amite commented 6 years ago

Was playing around with the async example: https://codesandbox.io/embed/lxly45lvkl on localhost and noticed this in my React Dev Tools:

screen shot 2018-02-23 at 9 22 23 am

There are two unknown Components rendering which wrap ToolBar and Content. Why is that? 🧐

drcmda commented 6 years ago

@amite This happens why you export anonymous (unnamed) components, which the hoc's were. See: https://stackoverflow.com/questions/43458971/react-dev-tools-show-my-component-as-unknown

I made an update (3.8.3) and named them: SubscribeWrapper, ModuleContext, NamedContext and TransformContext.

amite commented 6 years ago

Understood 👌