Skip to content

Commit 24f0d6b

Browse files
committed
fix Simon review
1 parent 9f8e140 commit 24f0d6b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ux.symfony.com/cookbook/component_architecture.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ In Symfony UX exist two packages: [TwigComponents](https://symfony.com/bundles/u
1313
Those two packages allow you to create reusable components in your Symfony application.
1414
But the component architecture is not exclusive to Symfony, it's a design pattern that can be applied to any programming language or framework.
1515
And the Javascript world already implements this architecture for long time, on many different frameworks like React, Vue, or Svelte.
16-
So, a set of rules and pattern has already be defined to work with components. This is why Symfony UX try to be as close as possible to those rules.
17-
So let's see what are those rules!
16+
So, a set of rules and patterns has already be defined to work with components. This is why Symfony UX tries to be as close as possible to those rules.
17+
So, let's see what those rules are!
1818

1919
## 4 Rules
2020

@@ -48,18 +48,18 @@ Or you can make composition with the following syntax:
4848
</twig:Card>
4949
```
5050

51-
So here we have a Card component, and we give to the content of this component two others components.
51+
So here we have a Card component, and we give to the content of this component two other components.
5252

5353
### Independence
5454

55-
This is a really important rule, and not obvious. But your component should leave on his own context,
56-
it 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 works exactly the same.
57-
This rule make your component truly reusable.
55+
This is a really important rule, and not obvious. But your component should live on his own context,
56+
it should not be aware of the rest of the page. You should be able to take a component into a page, from another and it should work exactly the same.
57+
This rule makes your component truly reusable.
5858

5959
***How does it work into Symfony?***
6060

6161
Symfony keeps the context of the page into the context of your component. So this your own responsibility to follow those rules.
62-
But notice that if there are conflicts between a variable from the context page and your component, your component context override the page context.
62+
But notice that if there are conflicts between a variable from the context page and your component, your component context overrides the page context.
6363

6464
### Props
6565

0 commit comments

Comments
 (0)