transient-props
-
Warning Received `true` for non-boolean attribute :: 마이구미React 2020. 11. 6. 22:10
이 글은 styled-components 에서 발생할 수 있는 Warning 을 다룬다. "non-boolean attribute" 에 관한 Warning 을 경험했다면, 이 글이 충분히 도움이 될 것이다. 원인과 해결방안 그리고 실제 Github 에 등록된 이슈와 버전 히스토리을 살펴본다. styled-components 를 사용하다보면, 다음과 같은 Warning 을 경험할 수도 있다. Warning: Received `true` for a non-boolean attribute `{속성}`. If you want to write it to the DOM, pass a string instead: {속성}=“true” or {속성}={value.toString()}. 사실 Warning 내용만으로는 ..