Code Monkey home page Code Monkey logo

Comments (7)

JOU-amjs avatar JOU-amjs commented on August 24, 2024 1

@proddy I will see it tomorrow. now I have to go to sleep.🥱

from alova.

JOU-amjs avatar JOU-amjs commented on August 24, 2024 1

@proddy Now the bug is fixed. the reason is react strict mode will emit useEffect twice and the second time is going to send a request

from alova.

JOU-amjs avatar JOU-amjs commented on August 24, 2024

Hi proddy! thanks for supporting alova.☺️
If it's the same as what you describe, I think it should be a bug. but this case is already passed unit test, see here(second test)
so, you can provide a demo which can reproduce the bug, I will resolve it as soon as possible.

from alova.

proddy avatar proddy commented on August 24, 2024

Hey, thanks for the quick response. I cooked up a really small sandbox app here . When you run it, and monitor the traffic using the browser dev tools->Network you'll see it'll always make the Request even if the immediate flag is false. Hope it helps!

from alova.

JOU-amjs avatar JOU-amjs commented on August 24, 2024

🎉 This issue has been resolved in version 2.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

from alova.

proddy avatar proddy commented on August 24, 2024

@proddy Now the bug is fixed. the reason is react strict mode will emit useEffect twice and the second time is going to send a request

Thanks for the quick fix, much appreciated. I was thinking last night too it may be related to the Strict mode so good catch. I'm really loving this library.

from alova.

JOU-amjs avatar JOU-amjs commented on August 24, 2024

😁😁😁
Another small secret is that alova's shared request can prevent sending request twice during initialization in react strict mode

from alova.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.