From ed29b2834dcfe9977284de37d44a72ca29beddae Mon Sep 17 00:00:00 2001 From: carloluis Date: Sun, 21 Oct 2018 12:03:34 +0200 Subject: [PATCH] fix log message hint for ownProps on map function - mapStateToProps with default value for ownProps parameter - ownProps always be the default value --- docs/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 3252f6e7f..155d7b444 100644 --- a/docs/api.md +++ b/docs/api.md @@ -102,9 +102,10 @@ function mapStateToProps(state) { ```js const mapStateToProps = (state, ownProps = {}) => { console.log(state); // state - console.log(ownProps); // undefined + console.log(ownProps); // {} } ``` + Functions with no mandatory parameters or two parameters **will receive** `ownProps`. ```js const mapStateToProps = (state, ownProps) => {