I'm creating a very simply input form in my react-redux app with redux-form. I'm following along the with the example of the redux-form page, but it's throwing me an error. The source of the error comes from trying to set the component prop to React.DOM.input. It throws this error:
TypeError: _react2.default.DOM is undefined
However, if I pass the string 'input' into the component prop, it works fine, and I can see the changed state in my redux dev tool. I'm just reaaaaally not sure where I got the idea to put it as a string and now I'm super curious 😂.
let SubsForm = ({ handleSubmit, availScripts }) => {
const subs = availScripts.map(script =>
[
<label htmlFor={script}>{script}</label>,
<Field key={script} component={React.DOM.input} type="checkbox" name={script} />,
<br />,
]
);
return [
<form>
{subs}
</form>
];
};
Thanks