File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1898,24 +1898,24 @@ List of 300 VueJS Interview Questions
1898
1898
1899
1899
Let's take an example of simple Div markup and corresponding render function.
1900
1900
The HTML markup can be written in template tag as below,
1901
- ` ` ` javascript
1901
+ ` ` ` vue
1902
1902
< template>
1903
- < div : class = " {'is-rounded': isRounded}" >
1904
- < p> Welcome to Vue render functions< / p>
1905
- < / div>
1903
+ < div : class = " {'is-rounded': isRounded}" >
1904
+ < p> Welcome to Vue render functions< / p>
1905
+ < / div>
1906
1906
< / template>
1907
1907
```
1908
1908
and the compiled down or explicit render function would appear as below,
1909
1909
```javascript
1910
1910
render: function (createElement ) {
1911
- return createElement (' div' , {
1912
- ' class' : {
1913
- ' is-rounded' : this .isRounded
1911
+ return createElement (' div' , {
1912
+ ' class' : {
1913
+ ' is-rounded' : this .isRounded
1914
1914
}
1915
- }, [
1916
- createElement (' p' , ' Welcome to Vue render functions' )
1917
- ]);
1918
- },
1915
+ }, [
1916
+ createElement (' p' , ' Welcome to Vue render functions' )
1917
+ ]);
1918
+ }
1919
1919
```
1920
1920
** Note: ** The react components are built with render functions in JSX .
1921
1921
You can’t perform that action at this time.
0 commit comments