This repository has been archived by the owner on Jul 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
4/8 review of the properties page #85
Open
rlasjunies
wants to merge
3
commits into
yewstack:master
Choose a base branch
from
rlasjunies:properties
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
{% hint style="info" %} | ||
Types for which you derive `Properties` must also implement `Clone`. This can be done by either using `#[derive(Properties, Clone)` or manually implementing `Clone` for your type. | ||
{% endhint %} | ||
The properties bag is attached to the state adding the field `props` in the component struct and defining the `Properties` `Type` in the component trait implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add a field props
in the struct implementing Component
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistake from my learning. I was following the # Optimizations & Best Practices. Where it is recommend to attach.
After few days ... I assumed it was necessary :-(
I will remove the reference to the concept of attaching.
I will do it after lunch ... ;-)
Yes, we could say something more along the lines of “It’s good practice to divide up your application into multiple components and split them across different files. As your application becomes larger, this quickly becomes essential.”
… On 9 May 2020, at 17:50, Richard Lasjunies ***@***.***> wrote:
@rlasjunies commented on this pull request.
In src/concepts/components/properties.md <#85 (comment)>:
> ---
# Properties
-Properties enable child and parent components to communicate with each other.
+It is a common need to receive data from the parent component using properties.
Not sure it's necessary to have "as an application becomes more complex, it becomes necessary to split it up into many different components to achieve an effective separation of concerns."
In some way it should be the introduction of Components.
Anyway, I paste your whole proposal.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#85 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKFSTPKV42ZVIXTQFFFMW7TRQWCV3ANCNFSM4M4JYSSQ>.
|
Ok.
… On 9 May 2020, at 18:14, Richard Lasjunies ***@***.***> wrote:
@rlasjunies commented on this pull request.
In src/concepts/components/properties.md <#85 (comment)>:
>
-{% hint style="info" %}
-Types for which you derive `Properties` must also implement `Clone`. This can be done by either using `#[derive(Properties, Clone)` or manually implementing `Clone` for your type.
-{% endhint %}
+The properties bag is attached to the state adding the field `props` in the component struct and defining the `Properties` `Type` in the component trait implementation.
I used to speak about "bag" for a "container" (struct instance in that case) passed around methods. Inside this "container" there is key/values.
... don't mind
I will remove it from the doc when I retrieve it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#85 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKFSTPLPOD53QW3LBVFRXTTRQWFO7ANCNFSM4M4JYSSQ>.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The previous content on the "## Memory/speed overhead of using Properties" is maintained as is