fixed typo in docs\docs\contributor\frontend\advanced\best-practices.mdx (#1993)

This commit is contained in:
Subash-Lamichhane
2023-10-13 13:03:58 +05:45
committed by GitHub
parent 13db1bd0a6
commit 92b34a76a2

View File

@@ -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