// 작동 제대로 안되는 코드
return(
<input
className="btn btn--blue btn--border-zero"
type="submit"
value="트윗하기"
disabled={tweet.length < 1 || attachment === "" ? true: false}
/>
)
// 작동 제대로 되는 코드
return(
<input
className="btn btn--blue btn--border-zero"
type="submit"
value="트윗하기"
disabled={tweet.length > 0 || attachment !== "" ? false : true}
/>
)
이거 때문에 삽질 한 30분은 했는데
아니 첫 번째 두 번째 둘 다 같은 건데 왜 첫 번째는 작동이 안되고 두 번째는 되는거지 ㅠㅠ?