8000 add note about higher order components on composition.md · vuejs/v2.vuejs.org@6e8be5a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e8be5a

Browse files
committed
add note about higher order components on composition.md
1 parent be6ab0d commit 6e8be5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/v2/guide/composition.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ function createComponent (options) {
427427
}
428428
```
429429

430+
> If you're familiar with React, their [higher-order components](https://reactjs.org/docs/higher-order-components.html) are one kind of factory function.
431+
430432
Factory functions allow you to better control and simplify how component variations are created. For example, it could be argued that the `ErrorNote` we [created earlier with extension](#An-Example-Use-Case) would be conceptually simpler as a factory function:
431433

432434
``` js

0 commit comments

Comments
 (0)
0