jamesplease/react-request

Redundant `render` run with outdated state

Open

#196 geöffnet am 24. Sept. 2018

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (21 Forks)github user discovery
help wantedrefactor

Repository-Metriken

Stars
 (358 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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?

Contributor Guide