Skip to content

Commit 1609a0e

Browse files
committed
fix Simon review
1 parent e625c9c commit 1609a0e

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
@@ -15,8 +15,8 @@ In Symfony UX exist two packages: [TwigComponents](https://symfony.com/bundles/u
1515
Those two packages allow you to create reusable components in your Symfony application.
1616
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 Javascript world already implements this architecture for long time, on many different frameworks like React, Vue, or Svelte.
18-
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.
19-
So let's see what are those rules!
18+
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.
19+
So, let's see what those rules are!
2020

2121
## 4 Rules
2222

@@ -50,18 +50,18 @@ Or you can make composition with the following syntax:
5050
</twig:Card>
5151
```
5252

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

5555
### Independence
5656

57-
This is a really important rule, and not obvious. But your component should leave on his own context,
58-
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.
59-
This rule make your component truly reusable.
57+
This is a really important rule, and not obvious. But your component should live on his own context,
58+
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.
59+
This rule makes your component truly reusable.
6060

6161
***How does it work into Symfony?***
6262

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

6666
### Props
6767

0 commit comments

Comments
 (0)