Skip to content

Commit 6d36ce5

Browse files
committed
[Cookbook] - fix component_architecture
1 parent e6be7a8 commit 6d36ce5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ux.symfony.com/cookbook/component_architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ published_at: '2024-08-02'
1313

1414
In SymfonyUX exist two packages: [TwigComponents](https://symfony.com/bundles/ux-twig-component/current/index.html) and [LiveComponent](https://symfony.com/bundles/ux-live-component/current/index.html).
1515
Those two packages allow you to create reusable components in your Symfony application.
16-
But the component architecture is not exclusive to Symfony, it is a design pattern that can be applied to any programming language or framework.
16+
But the component architecture is not exclusive to Symfony, it's a design pattern that can be applied to any programming language or framework.
1717
And the js world already implement this architecture for long time, on many different frameworks like React, Vue, or Svelte.
1818
So, a set of rules and pattern has already be defined to work with components. This is why SymfonyUX try to be as close as possible to those rules.
1919
So let's see what are those rules!
@@ -52,18 +52,18 @@ Or you can make composition with the following syntax:
5252
</twig:Card>
5353
```
5454

55-
So here we Card component, and we give to the content of this component mutliple other components.
55+
So here we Card component, and we give to the content of this component two others components.
5656

5757
### Independence
5858

5959
This is a really important rule, and not obvious. But your component should leave on his own context,
60-
he should not be aware of the rest of the page. You should to talk one component into a page, to another and it should work exactly the same.
61-
This rule make your component trully reusable.
60+
he should not be aware of the rest of the page. You should be able to take one component into a page, to another and it should work exactly the same.
61+
This rule make your component truly reusable.
6262

6363
***How does it work into Symfony?***
6464

65-
Symfony keep the context of the page into the context of your component. So this your own responsability to follow this rules.
66-
But notice that if there are conflic between a variable from the context page and your component, your component context override the page context.
65+
Symfony keep the context of the page into the context of your component. So this your own responsibility to follow this rules.
66+
But notice that if there are conflict between a variable from the context page and your component, your component context override the page context.
6767

6868
### Props
6969

0 commit comments

Comments
 (0)