From ce6f66481db987c65931c285ff2ddd84b6faf11d Mon Sep 17 00:00:00 2001 From: Ben Dougherty Date: Thu, 19 Jul 2018 14:51:56 +0800 Subject: [PATCH] Don't refetch if there is already a request started --- src/query.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/query.js b/src/query.js index 9c072a8c..0181d213 100644 --- a/src/query.js +++ b/src/query.js @@ -22,7 +22,9 @@ export default function query(propName, apiCall, dispatcher = defaultDispatcher) } componentDidMount() { - this.fetch(); + if (!this.props.request.hasStarted) { + this.fetch(); + } } componentWillReceiveProps(nextProps) {