jamesplease/react-request

Redundant `render` run with outdated state

Open

#196 建立於 2018年9月24日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)JavaScript (21 fork)github user discovery
help wantedrefactor

倉庫指標

Star
 (358 star)
PR 合併指標
 (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?

貢獻者指南