Skip to content

infinite loop occurs on v2 #501

Closed
Closed
@mehm8128

Description

@mehm8128

I upgraded connect-query-es and peripheral connect tools to v2 referencing migration guide, but infinite loop occurs when we call unary method.

This is my minimal reproduction source code which I created based on the examples-es/nextjs.
https://github.com/mehm8128/connect-query-infinite-loop-repro

Please check it following the below procedures.

  1. clone reprository
  2. run npm i
  3. temporarily comment out 13 to 22 lines (the definition of res and the calling useEffect) in pages/index.tsx (or you will not be able to see the page)
  4. start server with npm run start (you will fail to run npm run build, so use start command)
  5. when you can see aaa text on the started page (http://localhost:3000 ) , revert the comment out you did in the third step
  6. you will find the infinite loop on the network tab of the devtools

Sorry if there is any my mistake, but thank you for checking my issue 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions