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

Run StoreConnector.converter when parent State rebuilds? #3

Closed
brianegan opened this issue Dec 21, 2017 · 1 comment
Closed

Run StoreConnector.converter when parent State rebuilds? #3

brianegan opened this issue Dec 21, 2017 · 1 comment

Comments

@brianegan
Copy link
Owner

Might not be possible given the way the converter is hooked up to the stream, but should be investigated further.

Note: From "arranf" on gitter.

@brianegan
Copy link
Owner Author

Looked at this issue. I don't think there's a clean way to do this.

Suggested alternative: Use StoreBuilder. The converter function can not be cleanly called when the parent Widget performs setState, but the builder function is always called again.

Therefore, use a StoreBuilder, and assemble a whole ViewModel in the builder function, which can access both the Store.state and the Widget's local State, instead of performing this work in the converter.

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

1 participant