Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uprepro: findComponent fails inside a Suspense #88
Conversation
I have written tests in my other apps that work fine w/ Suspense. I think this is related to findComponent. We should support this. @dobromir-hristov may have some ideas, he knows more about how Edit: looks |
Edit edit: the blow by blow commentary continues -
This should be fixable. I tried turning these guys into an array but that did not work. I also tried doing I am worried what other edges cases are involved here, though. Excellent work catching this early. I definitely recommend asserting against the DOM where possible, as opposed to components. |
As a quick sanity check, I added a test for |
Done. Suspense is pretty much still Alpha and not complete. |
wow, nice @dobromir-hristov. I tried something like that but it did not work Great! |
Actually @dobromir-hristov close, but not quite there. I changed the test:
This is failing on the first assertion - because both default and fallback are in the Suspense tree. Any way to know which one is visible (other than the obvious solution of the DOM). |
hm... Will check it out. |
@dobromir-hristov @lmiller1990 Where are we on this PR? |
I played with it but got nowhere... Will try again this week. |
As this was bugging me, I read the code of |
This adds a failing unit-test to showcase how
findComponent
fails if the search component is inside aSuspense
.I was naively expecting it to work, do you think we should support this?