tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

Add filtering to queries, enabling components to select only data they

Open tonyhb opened this issue 7 years ago • 2 comments

Fixes https://github.com/tonyhb/tectonic/issues/95

tonyhb avatar Jul 26 '17 05:07 tonyhb

For example:

@load({
  email: User.getItem().filter((user) => user.email)
})
class EmailAddress extends PureComponent {
  props: {
    email: string
  }
}

Or:

@load({
  emails: User.getList().filter((users) => users.map(u => u.email))
})
class EmailAddress extends PureComponent {
  props: {
    email: Array<string>
  }
}

tonyhb avatar Jul 26 '17 05:07 tonyhb

I'd like to revisit propinspector before merging this. Looking at it i'm not certain the while is sound.

tonyhb avatar Jul 26 '17 05:07 tonyhb