babel-plugin-transform-vue-jsx icon indicating copy to clipboard operation
babel-plugin-transform-vue-jsx copied to clipboard

<input value> acceptValue.includes is not a function

Open DM2489 opened this issue 7 years ago • 0 comments

When elements require a value property, how is this best done? I keep getting the error message whenever I go near a value property.

Example

render() {
        return (
            <input value="0" />
        )
    }

Error:

TypeError: file.js: acceptValue.includes is not a function
    at module.exports (node_modules\babel-plugin-transform-vue-jsx\lib\must-use-prop.js:4:38)
    at node_modules\babel-plugin-transform-vue-jsx\index.js:100:19
    at Array.forEach (native)
    at JSXOpeningElement (node_modules\babel-plugin-transform-vue-jsx\index.js:91:24)

I can fix this by using domPropsValue but is this the correct/only solution? If so, this should be added to the documentation!

render() {
        return (
            <input domPropsValue="0" />
        )
    }

DM2489 avatar Jul 11 '18 15:07 DM2489