Giter Site home page Giter Site logo

Comments (7)

bluebill1049 avatar bluebill1049 commented on July 18, 2024 1

About what I just answered #779 (comment)

I think after some understanding that it's just a matter of doc πŸ˜… Also giving less possibility is also less confusing.

Without deprecating the feature or remove it, we could just omit it in the doc, as we can achieve the same goals in one syntax. So why present two (the first one is a bit more confusion as props are getting overrided in all case

I think you are 100% right on that, it's my fault of lack of documentation! I will improve it over this week or the weekend. Feel free to leave some suggestions as well, as we can improve this together.

from documentation.

ScreamZ avatar ScreamZ commented on July 18, 2024 1

About what I just answered #779 (comment)
I think after some understanding that it's just a matter of doc πŸ˜… Also giving less possibility is also less confusing.
Without deprecating the feature or remove it, we could just omit it in the doc, as we can achieve the same goals in one syntax. So why present two (the first one is a bit more confusion as props are getting overrided in all case

I think you are 100% right on that, it's my fault of lack of documentation! I will improve it over this week or the weekend. Feel free to leave some suggestions as well, as we can improve this together.

Don't blame yourself, it's already huge to have developed this, I love writing doc, I'll give some help (already did :p) and it's always better when someone that hasn't the full experience and background on the lib that give feedback as you have more information than I :p

from documentation.

bluebill1049 avatar bluebill1049 commented on July 18, 2024

To reduce confusion, only allows the <Controller as={Switch} /> syntax and remove the <Controller as={<Switch name="blabla" />} /> one, and always pass full props to that component ?

why there is a problem?

I see that the dependency has not been given.

I guess register and unregister should have name as deps, isn't? otherwise, we might experience a memory leak?

valid point. right now it's fine because useForm is handling all the cleanup

  if (!fields[name]) { //only reigster field once
    registerField();
  }

  // eslint-disable-next-line react-hooks/exhaustive-deps
  React.useEffect(() => () => unregister(name), []); // only run when component unmount

from documentation.

ScreamZ avatar ScreamZ commented on July 18, 2024

About what I just answered react-hook-form/react-hook-form#779 (comment)

I think after some understanding that it's just a matter of doc πŸ˜… Also giving less possibility is also less confusing.

Without deprecating the feature or remove it, we could just omit it in the doc, as we can achieve the same goals in one syntax. So why present two (the first one is a bit more confusion as props are getting overrided in all case

from documentation.

bluebill1049 avatar bluebill1049 commented on July 18, 2024

we should add name in the dep tho, which you are correctly. I am slowly waking up now heheh

from documentation.

bluebill1049 avatar bluebill1049 commented on July 18, 2024

Yea you are right! Thanks for contribution and all your feedbacks. They r really helpful not just for me and others after we improve the doc. I would love to see your avatar on our contribution list ;) so feel free send PR for things β€οΈπŸ‘Œ

Let’s keep this issue open, we can discuss while we making improvement on the doc.

from documentation.

bluebill1049 avatar bluebill1049 commented on July 18, 2024

Just saw ur PR at the website. Awesome stuff approved and merged ❀️

from documentation.

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.