Closed JeromeDeLeon closed 4 years ago
I do want to avoid explicit types for input
or select
tag. Do you know how to do that, @bluebill1049 ? If so, feel free to takeover.
Well same thing is happening but with just innerProps
to avoid collision
<RHFInput as={<RadioGroup aria-label="something" />} />
At first, I thought just spreading the props works but then collision happens
by the way, next time @JeromeDeLeon dont fork it just branch off the master. you are member of the entire react hook form repo group
by the way, next time @JeromeDeLeon dont fork it just branch off the master. you are member of the entire react hook form repo group
Sorry, I'm still not familiar with git in general. Actually, I tried to create a branch locally however, I'm stuck with publishing it remotely.
by the way, next time @JeromeDeLeon dont fork it just branch off the master. you are member of the entire react hook form repo group
Sorry, I'm still not familiar with git in general. Actually, I tried to create a branch locally however, I'm stuck with publishing it remotely.
that's all good bro :)
by the way, I don't think @barrymay and @stramel are helping the repo at the moment. (at least for now)
by the way, I don't think @barrymay and @stramel are helping the repo at the moment. (at least for now)
I see. I'd really like to get their opinion on this one.
<RHFInput<SelectProps> as={Select} />
It doesn't feel right to me.
by the way, I don't think @barrymay and @stramel are helping the repo at the moment. (at least for now)
I see. I'd really like to get their opinion on this one.
<RHFInput<SelectProps> as={Select} />
It doesn't feel right to me.
to be honest, I think this looks over complicated
<RHFInput as={Select} />
I would only aim for this
asFragment()
instead of asFragment
The hurdles we have are that first, we need
innerProps
if user wants to pass props to the inner component and also to improve performance, they might wanna memoize the object to avoid re-rendering because some component likeRadioGroup
hasname
prop which collides with ourname
prop henceinnerProps
. Second, for TS users, they need to explicitly pass the props of the component that will replace theRHFInput
inside since we're making a generic component here. I'm not very familiar around typescript. I might as well ask @barrymay or @stramel for improvement or if I did wrong here.