Uh oh!
There was an error while loading. Please reload this page.
4/8 review of the properties page - #85
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| {% 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.
You don't need to add a field props in the struct implementing Component.
There was a problem hiding this comment.
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 ... ;-)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
teymour-aldridge
commented
May 9, 2020
via email
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>.
|
teymour-aldridge
commented
May 9, 2020
via email
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>.
|
The previous content on the "## Memory/speed overhead of using Properties" is maintained as is