PropTypes in container components

Can I use PropTypesin container components?

As a rule, in the components of the container, I connect to the redux repository and get my own data, but there are times when I want to transfer additional details from the parent component. In such cases, I want to make sure that I get all the necessary data using PropTypes. For instance:

MyComponent.PropTypes = {
   someObject: PropTypes.object.isRequired
}

I have not seen examples of use PropTypesin container components, so I'm not sure if I can do this or not.

+4
source share
1 answer

. , , , , . , " ", . , , , , .

"" , "".

+1

Source: https://habr.com/ru/post/1683383/


All Articles