TypeError: Cannot read property 'nodeName' of null
at shouldUseChangeEvent (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:6310:22)
at Object.extractEvents (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:6495:9)
at Object.extractEvents (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:715:46)
at Object.handleTopLevel [as _handleTopLevel] (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:772:35)
at handleTopLevelImpl (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:7051:24)
at batchedUpdates (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:14806:14)
at performFiberBatchedUpdates (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:6161:10)
at stackBatchedUpdates (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:6152:10)
at batchedUpdates (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.js:6166:10)
at Object.batchedUpdatesWithControlledComponents [as batchedUpdates] (/Users/brandondail/projects/react-tester/node_modules/react-dom/cjs/react-dom.development.
js:6179:12)
finalizeInitialChildren eventually calls setValueForProperty for the image tag, which sets the src property, and causes jsdom to trigger an event. The top level event listener then grabs that instance, which has no stateNode which eventually triggers the error.
ReactTestUtils is likely to be used frequently with jsdom so I think it's important to support. Is this something that can be addressed in Fiber?
With the following, using the latest alpha (10) and
jsdom
9.12.0:The following error is thrown:
The issue is that
completeWork
callsfinalizeInitialChildren
before it sets thestateNode
on theworkInProgress
.finalizeInitialChildren
eventually callssetValueForProperty
for the image tag, which sets thesrc
property, and causes jsdom to trigger an event. The top level event listener then grabs that instance, which has nostateNode
which eventually triggers the error.ReactTestUtils
is likely to be used frequently with jsdom so I think it's important to support. Is this something that can be addressed in Fiber?