willowtreeapps / react-formable

React Forms
25 stars 5 forks source link

Add warnings for an improperly named component. #92

Closed kaw2k closed 7 years ago

kaw2k commented 7 years ago

There are several situations which can cause a nameed component to raise warnings:

Statless components react-formable requires refs on inputs in order to extract their value. Since we can't attach a ref to a stateless component, we are out of luck. Your best option is to wrap the stateless component in a statefull component that tracks the value of your input.

Decorated components When you decorate a component your instance functions on your component are hidden beneath your decorator. To circumvent this you can hoist getValue if you have control over the decorator.