I'd like to create a component that uses Inputs.
When I add the error prop, the error is not displayed however.
<Input placeholder="First name" type="text" error="This is an error" />
I know I can trigger an error with setError("error text") but this does not seem to embrace the
declarative style of React.
Would it be possible to respect the error prop? So that when I add it, the error gets shown in the render phase?
I'd like to create a component that uses
Inputs.When I add the
errorprop, the error is not displayed however.I know I can trigger an error with
setError("error text")but this does not seem to embrace thedeclarative style of React.
Would it be possible to respect the error prop? So that when I add it, the error gets shown in the render phase?