component like so:
                  
                  
                  class SomeComponent extends Component {
                  
                  
                      static propTypes = {
                  
                  
                          ...
                  
                  
                      }
                  
                  
                  }
                  
                  
                  
                  
                  
                  I'm trying to figure out if you can do this with stateless components as well? If I do something like:
                  
                  
                  const SomeComponent = (props) => {
                  
                  
                      this.propTypes = { ... }
                  
                  
                  }
                  
                  
                  my propTypes are ignored.
                  
                  
                  
                  
                  
                  Google searches aren't turning anything up. Anyone know if this is possible? Or do I just have to set my propTypes after defining a stateless component?
                  
                  
                
Did you realized that you wrote propTypes into window?
Обсуждают сегодня