GithubHelp home page GithubHelp logo

Comments (4)

Santiago-j-s avatar Santiago-j-s commented on May 2, 2024 3

https://codesandbox.io/p/sandbox/competent-chatelet-8qvvnm?file=%2Fapp%2Fpage.tsx%3A3%2C43

I have an interesting observation (I'm not sure if it's the same bug but it seems related) with useFormStatus and server actions:

  • If a component only has the useFormStatus hook, it works correctly
  • If the component also has an useEffect hook, it does not work. The pending status changes to false almost inmediately

from react.

dev2xl avatar dev2xl commented on May 2, 2024 2

I'm facing same issues:

  • After triggering the action and pending goes to true, If the component is re-rendered after updating the state the pending status switch to false.
  • Pending stuck as true for long taking actions

This is stopping me to use this on production. Please we need some fix asap. Thanks!

from react.

mattcarrollcode avatar mattcarrollcode commented on May 2, 2024

Thanks for the bug report, I've reproduced the bug in a simpler codesandbox. It looks like right around 5s for a client action is the point when the pending property gets stuck and isn't updated: https://codesandbox.io/s/useformstatus-forked-vsdskv?file=/App.js

@acdlite can you take a look?

from react.

mattcarrollcode avatar mattcarrollcode commented on May 2, 2024

output

I updated the CodeSandbox to highlight that issue occurs with a client action that takes 5s but not a action that takes 4s. Its on the experimental channel. In my experimentation it occurs somewhere between 4900ms and 5000ms: https://codesandbox.io/s/useformstatus-forked-vsdskv?file=/App.js

from react.

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.