GithubHelp home page GithubHelp logo

reset form about react-use-form-state HOT 4 CLOSED

wsmd avatar wsmd commented on May 17, 2024 1
reset form

from react-use-form-state.

Comments (4)

wsmd avatar wsmd commented on May 17, 2024 2

Hi @playma256! There isn't currently a way to reset the form state, but I'm planning on adding that in the next release 0.9.0.

For the time being, a less-than-ideal workaround is to leverage the React's key to cause the form to re-render, though it might not work for every use case.

Consider the following example: https://codesandbox.io/s/x3kznwm6lo

from react-use-form-state.

freemember007 avatar freemember007 commented on May 17, 2024

+1,
can not give formState object a 'clear' medthod ?

from react-use-form-state.

bfillmer avatar bfillmer commented on May 17, 2024

@wsmd Saw you moved this to 0.10.0, need help with it or is it almost ready?

from react-use-form-state.

wsmd avatar wsmd commented on May 17, 2024

hey, @bfillmer - It's all good! I moved this to 0.10.0 so that I don't delay the 0.9.0 release.ย This has some overlap with #52 so I'm trying still to find a good balance between the two. I'm playing around with some ideas.

from react-use-form-state.

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.