Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

React.Suspense is broken #1

Closed
Hypnosphi opened this issue Oct 16, 2020 · 3 comments
Closed

React.Suspense is broken #1

Hypnosphi opened this issue Oct 16, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Hypnosphi
Copy link

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

@wojtekmaj wojtekmaj self-assigned this Oct 21, 2020
@wojtekmaj wojtekmaj added the bug Something isn't working label Oct 21, 2020
@wojtekmaj
Copy link
Owner

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...

@Hypnosphi
Copy link
Author

Render Suspence and get the type of its only child?

@wojtekmaj
Copy link
Owner

wojtekmaj commented Oct 29, 2020

@Hypnosphi can you use this branch and test if this works for you? #3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants