Git Product home page Git Product logo

Comments (4)

apollo79 avatar apollo79 commented on May 13, 2024 1

I think this would be a good addition. I recently found myself trying to import the FormProps type, which should also be exported I think. My workaround without modifying files was using:

import { Form } from "@modular-forms/solid";
import type { ComponentProps } from "solid-js";

type FormProps<TFieldValues extends FieldValues> = ComponentProps<typeof Form<TFieldValues>>;

but I think it would be much easier if the type would be exported.

@Corsal8 small hint: When using modular-forms with zod, it is better to use z.input<typeof UserSchema> instead of z.infer<typeof UserSchema>, as z.infer gives you the output type of the schema, while you need the input type (this is more important if using zods transform method)

from modular-forms.

fabian-hiller avatar fabian-hiller commented on May 13, 2024 1

Good idea! I will fix this in the next release.

from modular-forms.

Corsal8 avatar Corsal8 commented on May 13, 2024 1

Nice! Thanks a lot for the feedback! Also, thanks a lot @apollo79 for the suggestion! I was't aware of the z.input method, but I'll start using it for sure :)!

from modular-forms.

fabian-hiller avatar fabian-hiller commented on May 13, 2024

The changes are published with v0.11.0. Thank you for your contribution!

from modular-forms.

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.