v-bind="$props"

Marcos Neves
vuejs-tips
Published in
1 min readMay 2, 2017

Quick tip # 19, if you are lazy like me.

If you need to bind all props to a inner component like this:

<input :placeholder="placeholder" :required="required" :value="value">

You instead can do this:

<input v-bind="$props">

But only if defined in props.

--

--

Marcos Neves
vuejs-tips

Ancient Brazilian web developer, from php, through Rails to Javascript, Vue.js enthusiast to React.