it's too dirty and hard-to-work with. I consider creating wrapper/container component for it.
Idea here is to make Input component pure function and move this whole logic with getting register function from context (and potentially something else in the future) into it's own wrapper component that will simply call our pure Input and provide all needed props to it.
I'm not sure if this approach will be handy to use though, we'll see.
it's too dirty and hard-to-work with. I consider creating wrapper/container component for it.
Idea here is to make Input component pure function and move this whole logic with getting register function from context (and potentially something else in the future) into it's own wrapper component that will simply call our pure Input and provide all needed props to it.
I'm not sure if this approach will be handy to use though, we'll see.