New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to calculate `` at render time #264

tmeasday opened this Issue Oct 12, 2016 · 1 comment


None yet
2 participants
Copy link

tmeasday commented Oct 12, 2016

It seems like we are going through some contortions to keep up to date, which seems unnecessary given we can now call this.queryObservable.currentResult() in the render function to get the current data.

So I would suggest something like:

render() {
  let data;
  if (/*skipping*/) {
    data = { loading: false, errors: null };
  } else {
    data = assign({}, this.queryObservable.currentResult());
    // copy fields over from queryObservable

  // now render wrappedComponent with data

This comment has been minimized.

Copy link

jbaxleyiii commented Oct 12, 2016

@tmeasday YES!! I love this idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment