https://www.pluralsight.com/guides/applying-classes-conditionally-react
Applying Classes Conditionally in React | Pluralsight
At some point, when building a React component, you'll run into a situation where you need to apply a class based on some condition. Perhaps, you need to make an image bigger based on some state, or you need to make the image round instead of square based
www.pluralsight.com
<div className={` ${me ? 'chat-list mine' : 'chat-list others'}`}>
'React' 카테고리의 다른 글
조건부 렌더링 (0) | 2020.08.10 |
---|---|
Route Component에 props 전달하기 (0) | 2020.08.10 |
htmlReactParser (html parsing) (0) | 2020.07.27 |
비밀번호 변경 폼 resetpassword form handleEvent (0) | 2020.07.27 |
비밀번호 변경 버튼 resetpassword button event (0) | 2020.07.27 |
댓글