mirror of
https://github.com/lingble/twenty.git
synced 2025-11-03 14:17:58 +00:00
fixed typo in docs\docs\contributor\frontend\advanced\best-practices.mdx (#1993)
This commit is contained in:
committed by
GitHub
parent
13db1bd0a6
commit
92b34a76a2
@@ -237,7 +237,7 @@ const Form = () => <EmailField value="username@email.com" />;
|
||||
|
||||
## Component as props
|
||||
|
||||
Try as much as possible to pass uninstanciated components as props, so chilren can decide on their own of what props they need to pass.
|
||||
Try as much as possible to pass uninstanciated components as props, so children can decide on their own of what props they need to pass.
|
||||
|
||||
The most common example for that is icon components:
|
||||
|
||||
@@ -256,7 +256,7 @@ const MyComponent = ({ MyIcon }: { MyIcon: IconComponent }) => {
|
||||
};
|
||||
```
|
||||
|
||||
For React to understand that the component is a component, you need to use PascalCase, to later instanciate it with `<MyIcon>`
|
||||
For React to understand that the component is a component, you need to use PascalCase, to later instantiate it with `<MyIcon>`
|
||||
|
||||
## Prop Drilling: Keep It Minimal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user