Skip to content
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

Concurrent mode #638

Open
dminkovsky opened this issue Dec 8, 2019 · 4 comments
Open

Concurrent mode #638

dminkovsky opened this issue Dec 8, 2019 · 4 comments

Comments

@dminkovsky
Copy link

dminkovsky commented Dec 8, 2019

I am experimenting with Suspense/Concurrent Mode and am experiencing some issues with useTransition. It seems like useTransition({timeoutMs}) is not effective for suppressing route-related updates, and I am guessing that's because this library uses Redux for state management (vs. setState()). For example:

const [startTransition, isPending] = useTransition({timeoutMs: 5000})
function onClick() {
    startTransition(() => router.push('some-route'))
}

isPending is true for one or two renders, but then goes false well before the route actually transitions, and fallback UI is rendered for the route transition. The timeout is not observed for suspense boundaries that suspend during the transition.

Has anyone experienced this? If not, I could create a sandbox that demonstrates the issue.

@taion
Copy link
Contributor

taion commented Dec 9, 2019

I haven't tried this yet.

My plan FWIW is to refactor this library quite a bit for concurrent mode – much of the complexity here is in rendering various loading/pending states, essentially as a user-space implementation of the functionality that suspense now provides natively.

As these problems now get handled by React proper, it seems like it would be easier to work with things if that support were factored out.

@dminkovsky
Copy link
Author

Yes, I went through that exercise when I was playing with this and it was pretty fun: very little was left, concurrent mode really does handle all the heavy lifting. Looking forward to this version.

@ignatevdev
Copy link
Contributor

ignatevdev commented Mar 22, 2024

A few years have passed, react-router now supports react-suspense and implements data-fetching similar to how found does it, but in the end react-router still lacks a lot of functionality, therefore I would like to ask, @taion are you planning to release a new major version of found in the near future, or maybe you could use some help with integrating suspense / concurrent mode in found?

I would love to collaborate

@taion
Copy link
Contributor

taion commented Mar 22, 2024

I switched jobs a few years ago and I no longer actively use or maintain this package, sorry. This would have to be a question for whoever the current maintainer is.

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