Skip to content

Commit 4a45b37

Browse files
committed
docs: fix vModel & vOn code examples
closes #75
1 parent 4766700 commit 4a45b37

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import MyComponent from './my-component'
5252
export default {
5353
render() {
5454
return <MyComponent>hello</MyComponent>
55-
}
55+
},
5656
}
5757
```
5858

@@ -119,25 +119,25 @@ render() {
119119
### Directives
120120

121121
```jsx
122-
<input vModel="newTodoText" />
122+
<input vModel={this.newTodoText} />
123123
```
124124

125125
with a modifier:
126126

127127
```jsx
128-
<input vModel_trim="newTodoText" />
128+
<input vModel_trim={this.newTodoText} />
129129
```
130130

131131
with an argument:
132132

133133
```jsx
134-
<input vOn:click="newTodoText" />
134+
<input vOn:click={this.newTodoText} />
135135
```
136136

137137
with an argument and modifiers:
138138

139139
```jsx
140-
<input vOn:click_stop_prevent="newTodoText" />
140+
<input vOn:click_stop_prevent={this.newTodoText} />
141141
```
142142

143143
v-html:
@@ -151,13 +151,13 @@ v-html:
151151
Transpiles arrow functions that return JSX into functional components, when they are either default exports:
152152

153153
```jsx
154-
export default ({ props }) => <p>hello { props.message }</p>
154+
export default ({ props }) => <p>hello {props.message}</p>
155155
```
156156

157157
or PascalCase variable declarations:
158158

159159
```jsx
160-
const HelloWorld = ({ props }) => <p>hello { props.message }</p>
160+
const HelloWorld = ({ props }) => <p>hello {props.message}</p>
161161
```
162162

163163
## Compatibility

0 commit comments

Comments
 (0)