내가 완벽하게 여기 정적 함수 구문과 함께 작품을 찾고 있어요 기능성 그러나, 내가 생성자 자체에 선언 된 정적 기능을 (좋아, 즉 className.staticFunction() => ...
대신 클래스 정의 자체 내에서 static staticFunction =() => ...
의. 여기 정적 함수를 사용하지 않고이 고차 함수를 어떻게 다시 작성합니까?
static
구문 정의 된 정적 함수를 사용 리팩토링하려는 것을 언급하고있다.
const higherOrderFunction = another => andAnother => class extends Component {
static functionName = {
test: React.PropTypes.object
};
constructor(props) {
super(props);
}
render() {
return <h1>Hello, World!</h1>;
}
};
export default higherOrderFunction;
를? – Bergi