Skip to content

Some components don't render on second route change #2848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cd-a opened this issue Feb 13, 2022 · 4 comments
Closed

Some components don't render on second route change #2848

cd-a opened this issue Feb 13, 2022 · 4 comments

Comments

@cd-a
Copy link

cd-a commented Feb 13, 2022

🐛 Bug Report

Using a specific hook from react-fire breaks the rendering of some list based components, but only on second time rendering the routes

🤔 Expected Behavior

The rendering of components should not be affected.

😯 Current Behavior

Page one has no react-fire wired up, Page two does.

The first render or route render is all the same. But switching routes, the subsequent renders with react-fire break some components from displaying entirely.

render

💁 Possible Solution

react-fire is using observables, so maybe that is interfering with the internals of spectrum somehow?
I first thought that all List based components are affected, but the ActionGroup works fine, so that's not it.

While debugging, the ListView went to render the ListViewItem and reached the statement, but somehow the debugger inside ListViewItem never fired for some reason, as if he never stepped in there.

Since that component is alpha, I thought it might be a component issue, but ListBox behaves the same.

I am aware that this might be an issue with react-fire, but still wondering why a component would stop rendering like that.

🔦 Context

I am building an app with Firebase and spectrum but this bug makes it impossible to continue.

💻 Code Sample

https://codesandbox.io/s/spectrum-93izg?file=/src/App.js

🌍 Your Environment

Software Version(s)
react-spectrum 3.15.1
Browser Firefox 97, Chrome 98
Operating System macOS 12.2.1
@razvanip
Copy link
Contributor

@dahmc if u remove StrictMode all should work. There is an issue about it.

@cd-a
Copy link
Author

cd-a commented Feb 14, 2022

@razvanip Thanks, I removed it and that seems to do it.

I suppose you're referring to #779 and #2680 ?

@cd-a cd-a closed this as completed Feb 14, 2022
@cd-a
Copy link
Author

cd-a commented Feb 14, 2022

So we can keep this issue closed?

@reidbarber
Copy link
Member

Yeah, we'll handle it in that other issue, along with the other strict mode issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants