inferno: TypeError: Cannot read property 'flags' of null
Inferno@3.3.1
Uncaught TypeError: Cannot read property 'flags' of null
at patch (patching.js:15)
at patchComponent (patching.js:338)
at patch (patching.js:20)
at patchKeyedChildren (patching.js:440)
at patchChildren (patching.js:204)
at patchElement (patching.js:88)
at patch (patching.js:28)
at patchComponent (patching.js:283)
at patch (patching.js:20)
at patchChildren (patching.js:195)
Details
- Occurs only when component is updated. If I render component only once without updating it – no error occurs.
- It involves a component which calls
props.onNewValueinside a constructor (but only once, on the first construction). - I have a component with conditional children that are updated here. It is tricky to isolate, sorry.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (12 by maintainers)
The errors in this thread has been fixed. The original repro will not work in React either so there is something wrong in it. Inferno works same way as React so I’m closing this as working as intended now.
Here is React version behaving same way as Inferno: https://jsfiddle.net/2ukzrbwg/
But I think I will just add those lifecycle methods for next release and new
createRefAPI too