Git Product home page Git Product logo

ionic-react-forms's People

Contributors

jerrynavi avatar

Watchers

 avatar  avatar

ionic-react-forms's Issues

The code is broken for newer versions of react-hook-form

I just read the blog post on your website. It looked really cool. But, when I tried to follow the steps, there are many errors. Looks like you have written the code using react-hook-form@5. I am currently using [email protected] and there are a lot of breaking changes.
Can you please update the code to fit current version? This is my first time using this library. So, I don't know how to implement it and what's wrong.

Here are the issues I encountered:

Module '"react-hook-form"' has no exported member 'NestDataObject'.
Type '{ as: Element; name: string; control: Control<FieldValues> | undefined; onChangeName: string; }' is not assignable to type 'IntrinsicAttributes & { render: ({ field, fieldState, formState, }: { field: ControllerRenderProps<FieldValues, string>; fieldState: ControllerFieldState; formState: UseFormStateReturn<...>; }) => ReactElement<...>; } & UseControllerProps<...>'.
  Property 'as' does not exist on type 'IntrinsicAttributes & { render: ({ field, fieldState, formState, }: { field: ControllerRenderProps<FieldValues, string>; fieldState: ControllerFieldState; formState: UseFormStateReturn<...>; }) => ReactElement<...>; } & UseControllerProps<...>'.
Property 'errors' does not exist on type 'UseFormReturn<FieldValues>'.
Argument of type '{ validationSchema: ObjectSchema<Assign<ObjectShape, { email: RequiredStringSchema<string | undefined, Record<string, any>>; password: RequiredStringSchema<string | undefined, Record<...>>; }>, Record<...>, TypeOfShape<...>, AssertsShape<...>>; }' is not assignable to parameter of type 'Partial<{ mode: keyof ValidationMode; reValidateMode: "onBlur" | "onChange" | "onSubmit"; defaultValues: { [x: string]: any; }; resolver: Resolver<FieldValues, object>; context: object; shouldFocusError: boolean; shouldUnregister: boolean; criteriaMode: CriteriaMode; }>'.
  Object literal may only specify known properties, and 'validationSchema' does not exist in type 'Partial<{ mode: keyof ValidationMode; reValidateMode: "onBlur" | "onChange" | "onSubmit"; defaultValues: { [x: string]: any; }; resolver: Resolver<FieldValues, object>; context: object; shouldFocusError: boolean; shouldUnregister: boolean; criteriaMode: CriteriaMode; }>'.ts(2345)
(property) validationSchema: ObjectSchema<Assign<ObjectShape, {
    email: RequiredStringSchema<string | undefined, Record<string, any>>;
    password: RequiredStringSchema<string | undefined, Record<string, any>>;
}>, Record<...>, TypeOfShape<...>, AssertsShape<...>>

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.