I dare say we are reaching too much into react internals here. Here is the challenge. We only want to attach refs to valid formable inputs (a React.Component or similar component with a getValue function). The challenge is you normally sniff out that function via the ref and its instance. However when we are cloning these inputs, we don't have an instance yet. To get around this we inspect the prototype of the type of the component.
Fixes issue #92
I dare say we are reaching too much into react internals here. Here is the challenge. We only want to attach
ref
s to valid formable inputs (aReact.Component
or similar component with agetValue
function). The challenge is you normally sniff out that function via theref
and its instance. However when we are cloning these inputs, we don't have an instance yet. To get around this we inspect the prototype of the type of the component.