tonyhb / tectonic

A declarative REST data loader for React and Redux. Docs @
https://tonyhb.github.io/tectonic/
456 stars 31 forks source link

Conditional polling bug fix #86

Closed kyhy closed 7 years ago

kyhy commented 7 years ago

In the following example, if props.fetchMore is false initially and true later on, componentWillReceiveProps will error out while attempting to reassign newQueries params.

@load(props => {
  if (props.fetchMore) {
    return {
        model1: model1.getItem(),
        model2: model2.getItem()
    }
  }
  return {
      model1: model1.getItem()
  }
})
tonyhb commented 7 years ago

TY for the heads up ky. Can we chat about this when you're back from town on Monday/Tuesday so we can merge?

tonyhb commented 7 years ago

@kyhy you need a new release homeslice?

kyhy commented 7 years ago

@tonyhb new release would be great!