mobxjs / mobx-react-devtools

[DEPRECATED] Tools to perform runtime analyses of React applications powered by MobX and React
MIT License
1.23k stars 49 forks source link

Uncaught TypeError: e.node.getBoundingClientRect is not a function #80

Closed aap82 closed 6 years ago

aap82 commented 6 years ago

With displayUpdates enabled, and using a component like:

ObjPropDisplayer = observer ({ obj, prop }) => obj?[prop] or null

throws the above mentioned error because, well, it's not a DOM node, but still is a valid React (observer) component.

jamespedid commented 6 years ago

I have this issue too. The node element that is passed into the event object is text but there is no function. This should be addressed considering React can properly handle components that can simply return text.

image

To recreate it, simply use a component like

const FunctionalTextComponent = () => 'My functional text component'

Did not have this issue in 4.2.0

mweststrate commented 6 years ago

Does this still happen with mobx-react-devtools@6.0.1?

aap82 commented 6 years ago

this

const Title = observer(({ obj }) => `Counter App - ${obj.count}`)

Still does not work.

mweststrate commented 6 years ago

Fixed and released as 6.0.2

cc @aap82 @jamespedid