Giter VIP home page Giter VIP logo

Comments (5)

AlemTuzlak avatar AlemTuzlak commented on May 31, 2024 1

@CripyIce I released a new release that lets you pass a prop into useForm that allows you to either stringify strings as well or send them as is!

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 31, 2024

Hmm so the reason this happens is because in order to preserve your types and values instead of just values i JSON.stringify() each value so that later on on the server I can preserve numbers and booleans and so on. This is in line with what I was doing before v3 where I just JSON.stringified an object and sent it over the line instead. I think I can create a flag that allows you to either stringify everything or not based on your preference

from remix-hook-form.

CripyIce avatar CripyIce commented on May 31, 2024

As of the current version, how should I parse the values correctly?

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 31, 2024

parseFormData utility will return it to you properly, until I figure out a way to let you choose your use case, otherwise if you need something more custom you can either use your own submitter, something like:
onValid: data => submit(...your way to submit...)
or you can just JSON.parse() every field on the backend

from remix-hook-form.

CripyIce avatar CripyIce commented on May 31, 2024

Well, JSON.parse() did help for now.
If I will be able to configure this behavior with a flag it would be nice!
Thanks!

from remix-hook-form.

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.