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

When using next router's push, the nest controller does not execute. #109

Open
woodam opened this issue Jul 6, 2023 · 2 comments
Open

Comments

@woodam
Copy link

woodam commented Jul 6, 2023

Describe the bug
When using next router's push, the nest controller does not execute.

Expected behavior

스크린샷 2023-07-06 오후 2 01 55

스크린샷 2023-07-06 오후 2 04 57

When the URL is changed through the router, as shown in the attached image, the controller does not execute. Is there a possible solution to this

Version

  • next.js: 12.3.2
  • nest: 9.2.1
  • nest-next: 10.0.0
@SuhyeonP
Copy link

SuhyeonP commented Jul 6, 2023

I have same issue too.

@Lon4ry
Copy link

Lon4ry commented Oct 3, 2023

Try to use app directory. In issue #92 @yakovlev-alexey said, that

Nest controllers now get called on client-side navigations. Now this changes everything. Previously when (re)loading the page for the first time a Nest controller would get called. Later when you clicked a link in the browser an internal /_next/ endpoint would get called to invoke getServerSideProps function and recieve its results given the arguments (e.g. path params). Now when you click the link the actual path gets fetched.

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