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

Use async singleton router for MemoryRouterProvider #114

Merged

Conversation

tom-streller-tutti
Copy link
Contributor

We are using the next-router-mock/async provider and had a bunch of issues with the Provider, as it appeared all manipulations of the router get ignored by our components.

Looking into the code, I discovered why: The <MemoryRouterProvider /> ignores the async prop unless an url is given. However, when an url is given, a new router is created.

This should return the async singleton when requested - however, I could not test if it works for our application as I couldn't figure out how to include the package without it being published.

Copy link

changeset-bot bot commented Jan 19, 2024

🦋 Changeset detected

Latest commit: d2e8fff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
next-router-mock Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tom-streller-tutti
Copy link
Contributor Author

Merging this PR would also fix issue #111 .

@tom-streller-tutti
Copy link
Contributor Author

@scottrippey Any chance of getting this merged? It's currently blocking a crucial update for us.

Copy link
Owner

@scottrippey scottrippey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome work, thank you!

@scottrippey scottrippey merged commit 9660acc into scottrippey:main Feb 5, 2024
4 checks passed
@tom-streller-tutti tom-streller-tutti deleted the async-memory-router-provider branch February 6, 2024 07:05
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

Successfully merging this pull request may close these issues.

2 participants