I mean, You put put params in an array and so it is not clear to which param each item belong. Again, what is the benefit of this.
First thing in the article I would like to see purpose and benefit.
Please see original question on stackoverflow. Each componene receives all properties, but uses only a part from them. As for the benefits. I wanted to show how we can make basic validation of react components and their props. Also I wanted to show that sometimes it is tricky to work with FC<Props> type because of contravariance. If above examples are not useful for you, it is perfectly fine. Everybody has his own code style, guide, preferences etc...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I mean, You put put params in an array and so it is not clear to which param each item belong. Again, what is the benefit of this.
First thing in the article I would like to see purpose and benefit.
Please see original question on stackoverflow. Each componene receives all properties, but uses only a part from them. As for the benefits. I wanted to show how we can make basic validation of react components and their props. Also I wanted to show that sometimes it is tricky to work with
FC<Props>
type because of contravariance. If above examples are not useful for you, it is perfectly fine. Everybody has his own code style, guide, preferences etc...