Coder Social home page Coder Social logo

Comments (7)

mertsincan avatar mertsincan commented on May 5, 2024 5

Hi,

You can use react-hooks-form with PrimeReact;
https://primefaces.org/primereact/showcase/#/reacthookform

from react-hook-form.

bluebill1049 avatar bluebill1049 commented on May 5, 2024 2

thanks @mertsincan

from react-hook-form.

mertsincan avatar mertsincan commented on May 5, 2024 2

@bluebill1049, Thank you very much for this great form library. I really enjoyed integrating PrimeReact library and React Hook Form.

from react-hook-form.

bluebill1049 avatar bluebill1049 commented on May 5, 2024

hey,

I checked PrimeReact component source code, looks like they are not exposing ref at all. React Hook Form is not compatible with this UI library. :( maybe consider using material ui or another ui library if you can, otherwise, I don't think I can do much about it :(

cheers
bill

from react-hook-form.

bluebill1049 avatar bluebill1049 commented on May 5, 2024

I am going to close this issue, but leave an example for you :)

https://codesandbox.io/s/72j69vnk1x

in case you decide to go with another library like material UI

from react-hook-form.

narroyog avatar narroyog commented on May 5, 2024

It's possible to wrap the primereact component within a react-hook-form component to get it registered on the form:
https://react-hook-form.com/advanced-usage/#ControlledmixedwithUncontrolledComponents

from react-hook-form.

gokhantiknaz avatar gokhantiknaz commented on May 5, 2024

Hi,

I'm working with prime react & react-hook form validation.
But i couldnt get defaultvalues in useEffect. Or I cant set values from api in useEffect. what must i do for this? I'm using component inside components
MasterComponent
childcomponent 1
childcomponent 2

Master component includes two or more child component. And my submit button is in master component.

Here is a sample for only load values from api.

https://codesandbox.io/s/angry-gagarin-ypb3d

from react-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.