React.Suspense is broken
Hypnosphi opened this issue · comments
Filipp Riabchun commented
Whenever I mount a tree with React.Suspense, it throws:
Error: Enzyme Internal Error: unknown node with tag 23
at _toTree (/Users/jetbrains/IdeaProjects/TeamCity/react-ui/node_modules/@wojtekmaj/enzyme-adapter-react-17/src/ReactSeventeenAdapter.js:166:3)
at childrenToTree (/Users/jetbrains/IdeaProjects/TeamCity/react-ui/node_modules/@wojtekmaj/enzyme-adapter-react-17/src/ReactSeventeenAdapter.js:292:4)
Brief debugging showed that this probably is the new Offscreen
fiber type
Wojciech Maj commented
Looks like we need to add something in detectFiberTags.js
. But since Offscreen isn't exposed I have no clue on how to do this, hmmm...
Filipp Riabchun commented
Render Suspence
and get the type of its only child?
Wojciech Maj commented
@Hypnosphi can you use this branch and test if this works for you? #3