[React] 4강 조건부 렌더링
1. if 문 사용가장 기본적인 방법으로 if문이 있습니다. if문은 조건에 따라 렌더링할 내용을 결정합니다.import React from 'react';class MyComponent extends React.Component { render() { const isLoggedIn = true; // 또는 false로 설정 if (isLoggedIn) { return 환영합니다!; } else { return 로그인 해주세요.; } }}export default MyComponent;2. 삼항 연산자삼항 연산자를 사용하면 코드를 더욱 간결하게 작성할 수 있습니다.import React from 'react';const Trinomial = () => { co..