From: Jason Yu Date: Sat, 6 Jun 2020 11:13:37 +0000 (+0100) Subject: docs: use flatMap instead of map + flat (#290) X-Git-Tag: v4.0.0-alpha.13~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33b6c4d3cbaad585397bd5127104491433b04e10;p=thirdparty%2Fvuejs%2Frouter.git docs: use flatMap instead of map + flat (#290) --- diff --git a/README.md b/README.md index 1ee06c77..a6247bc6 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ Check the [playground](https://github.com/vuejs/vue-router-next/tree/master/play - `router.getMatchedComponents` is now removed as they can be retrieved from `router.currentRoute.value.matched`: ```js router.currentRoute.value.matched - .map(record => Object.values(record.components)) - .flat() + .flatMap(record => Object.values(record.components)) ``` - If you use a `transition`, you may need to wait for the router to be _ready_ before mounting the app: ```js