study: 리네다기 | 8장 - rest parameter

Lumpen·2023년 5월 6일
0

Study

목록 보기
71/92
const BorderedInput = ({hasMarginBottom, ...rest}: Props) => {
  return (
    <TextInput
      style={[styles.input, hasMarginBottom && styles.margin]}
      {...rest}
    />
  );
};

react 에서 props 를 rest 파라미터로 받을 수 있다
근데 가독성이.. 이거 맞나 싶은..??

profile
떠돌이 생활을 하는. 실업자는 아니지만, 부랑 생활을 하는

0개의 댓글