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
Question about handling an action in both components and controllers #86
Comments
Hmm, actually, I discovered that the reason I thought Sorry for the noise. |
This is really a bug with updateState that we plan to address shortly. It shouldn't synchronously unmount; instead that should be deferred to the end of the run loop. Sorry about that. |
Thanks! Would it be appropriate for me to file an issue so that I can track the progress of that? |
Sure. |
I want some buttons to toggle their images when tapped, and I've implemented that by updating the component's state. However, I also want to send an action upstream to a Controller which will handle the server work.
Concretely:
(where a Link is basically analogous to a Story in Facebook terms)
If I implement a
LinkVoteComponentController
, is it kosher for that to call[self.component updateState:...]
*? Do I call CKComponentActionSend from the Component? Or am I barking up the wrong responder tree?* currently, I just implement actions in the
LinkVoteComponent
directly, and update the state, with no server-side code implemented. Trying to find a way to avoid having to bake that into the Component.Basically, the question boils down to, in Facebook terms: How do I structure a Story-like component to handle an action similar to liking a Story?
The text was updated successfully, but these errors were encountered: