Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Potential bug fix with prop updates not rerendering with new data #1

Merged
merged 1 commit into from
Jan 12, 2015
Merged

Conversation

erictse
Copy link
Contributor

@erictse erictse commented Jan 10, 2015

Hi, this is a nifty module! Thanks for sharing.

I was trying to re-render my line chart by changing values in the parent component, so that the LineChart would recognize a prop update, but I discovered that it wouldn't re-render the chart using the new values. If I tried updating its props a second time, it would use the values from the first update.

I think initializeChart should use the props/nextProps argument instead of this.props because this.props gets gets updated after componentWillReceiveProps finishes. Let me know what you think.

use the old values instead of the new values.
jhudson8 added a commit that referenced this pull request Jan 12, 2015
Potential bug fix with prop updates not rerendering with new data
@jhudson8 jhudson8 merged commit 554885a into reactjs:master Jan 12, 2015
austinpray pushed a commit that referenced this pull request May 18, 2016
Fixes chart creation on initializeChart
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants