Document how the state of a Component can be managed#2556
Merged
hecrj merged 1 commit intoiced-rs:masterfrom Sep 13, 2024
Merged
Document how the state of a Component can be managed#2556hecrj merged 1 commit intoiced-rs:masterfrom
Component can be managed#2556hecrj merged 1 commit intoiced-rs:masterfrom
Conversation
Contributor
|
FYI |
ComponentComponent can be managed
hecrj
approved these changes
Sep 13, 2024
Member
hecrj
left a comment
There was a problem hiding this comment.
Thanks!
I removed the lifetime section since it was not really accurate. It's unclear what you meant by "parent component"; there is no such thing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
first of all thanks for your work on this amazing library: I've completed some toy projects with it and it was a pleasure to use.
While going through some of the examples I encountered a few challenges in understanding how
Components work, particularly regarding:Componentcalled? Is the invocation handled automatically by the runtime, or does this responsibility lie with the parent component?Component?After spending some more time experimenting and reasoning through these questions, I believe I've gained a better understanding. However, I realized that other newcomers might face similar difficulties, so I decided to add a couple of sections to the documentation of
Component. I hope that these additions will help others grasp these concepts more quickly.My contribution is based on my current understanding, so I'm completely open to feedback. If there are any inaccuracies or areas where improvements can be made, I'm more than willing to make the necessary revisions.
Lastly, if you think that expanding the documentation on this topic more would be valuable, I'd be happy to put together a pull request to add a dedicated page to the official book that explains how components work and how to use them effectively.