Skip to content
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

does react-native-realm support decorator syntax? #8

Open
tomprogers opened this issue Nov 9, 2017 · 1 comment
Open

does react-native-realm support decorator syntax? #8

tomprogers opened this issue Nov 9, 2017 · 1 comment

Comments

@tomprogers
Copy link

I use the decorator pattern for all top-level route components, e.g.:

@connect((state, props) => ({
  users: state.users.filter((u) => u.isActive !== props.selectedUserGroupId)
}))
export default class SceneHome extends Component {
  render() { /* stuff */ }
}

Can connectRealm be used in a similar way? Or is there a different export for that use-case?

@jasonmerino
Copy link
Owner

@tomprogers no, at this time it does not support the decorator syntax for connecting realm data. I would be open to implementing it in the future or merge a PR with that functionality. From what I know about decorators it would cause a breaking change in how you connect the components up, which I'm not opposed to, but is just something that we would need to be aware of and communicate properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants