vuejs / babel-plugin-transform-vue-jsx

babel plugin for vue 2.0 jsx
1.85k stars 132 forks source link

<input value> acceptValue.includes is not a function #142

Open DM2489 opened 6 years ago

DM2489 commented 6 years ago

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" />
        )
    }