tidepool-org/blip — pull request #101 by jebeck (2014-07-11 01:47:40+00:00)
Title: on creation or updating of message, update patientData and create or move message in tideline

@jh-bate @nicolashery have a look, please. (And at [tideline PR #141](https://github.com/tidepool-org/tideline/pull/141).)

I wasn't able to do what we discussed - updating `patientData` to trigger a rerender of the chart, because the only thing in `render()` for the (daily) chart component is `

` ([here](https://github.com/tidepool-org/blip/blob/master/app/components/chart/daily.js#L244)) which doesn't include the `patientData` prop, so when the updated prop comes in, React doesn't recognize the need to rerender.

I think the current solution is good enough for now - perhaps we can discuss a more React-y way to manage this in future (data attribute?). Right now I'm updating `patientData` from the return value of the method that updates tideline's data, so they are guaranteed to stay in sync.