jamesplease/react-request

Redundant `render` run with outdated state

开放

#196 创建于 2018年9月24日

 (3 条评论) (0 个反应) (0 位负责人)JavaScript (21 个派生)github user discovery
help wantedrefactor

仓库指标

星标
 (358 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

If I render the same Fetch with new url, first I get it's children rendered with previous state (old url, old data, etc.) It looks like the problem is known: https://github.com/jamesplease/react-request/blob/eca89d5fe79bd546a0641b6443415b722e3f6ec3/src/fetch.js#L107 It feels that it would be simple to fix it by updating Fetch state in componentWillReceiveProps hook. @jamesplease what's your opinion?

贡献者指南