From 76e1ed8f985aa862f7ccd69045176e2811d826e0 Mon Sep 17 00:00:00 2001 From: ThornWu Date: Tue, 15 Mar 2022 09:12:00 +0800 Subject: [PATCH] docs: fix the usage of history.listen --- contributors.yml | 1 + docs/getting-started/concepts.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contributors.yml b/contributors.yml index 47ea0ef0a..56fa79b53 100644 --- a/contributors.yml +++ b/contributors.yml @@ -46,3 +46,4 @@ - turansky - underager - vijaypushkin +- ThornWu diff --git a/docs/getting-started/concepts.md b/docs/getting-started/concepts.md index 5b810304d..aa765916a 100644 --- a/docs/getting-started/concepts.md +++ b/docs/getting-started/concepts.md @@ -127,7 +127,7 @@ That's where a React Router specific `history` object comes into play. It provid ```js let history = createBrowserHistory(); -history.listen((location, action) => { +history.listen(({location, action}) => { // this is called whenever new locations come in // the action is POP, PUSH, or REPLACE });