TIL no.38

손병진·2020년 9월 27일
0

wecode

목록 보기
24/27
post-custom-banner

this.props.children

Before

  render() {
    return (
      <div className="FilterVerticalBar">
        <FilterGender
          hideFilter={this.hideFilter}
          hideFilterImage={hideFilterImage}
          filterImage={filterImage}
        />
        <FilterType
          hideFilter={this.hideFilter}
          hideFilterImage={hideFilterImage}
          filterImage={filterImage}
        />
        <FilterColor
          hideFilter={this.hideFilter}
          hideFilterImage={hideFilterImage}
          filterImage={filterImage}
          productColor={productColor}
          filteringColor={(Color) => filteringColor(Color)}
        />
        <FilterSize
          hideFilter={this.hideFilter}
          hideFilterImage={hideFilterImage}
          filterImage={filterImage}
          productSize={productSize}
          filteringSize={(size) => filteringSize(size)}
        />
        <FilterSilluet
          hideFilter={this.hideFilter}
          hideFilterImage={hideFilterImage}
          filterImage={filterImage}
          productSilluet={productSilluet}
          filteringSilluet={(silluetEngName) =>
            filteringSilluet(silluetEngName)
          }
        />
      </div>
    );
  }
}

After

  render() {
    return (
      <div className="FilterVerticalBar">
        <FilterSection>
          <FilterChildren
          content={["남성","여성"]}
           />
        </ FilterSection>

        <FilterSection>
          <FilterChildren
          content={["뮬","샌들","스니커즈"]}
           />
        </ FilterSection>

        <FilterSection>
          <FilterChildren 
          content={productColor}
          filtering={filtering}
          />
        </ FilterSection>

        <FilterSection>
          <FilterChildren 
          content={productSize}
          filtering={filtering}
          />
        </ FilterSection>

        <FilterSection>
          <FilterChildren 
          content={productSilluet}
          filtering={filtering}
          />
        </ FilterSection>
      </div>
    );
  }
}
profile
https://castie.tistory.com
post-custom-banner

0개의 댓글