diff --git a/react-redux/src/App.js b/react-redux/src/App.js index 1c50abe9..57b8922f 100644 --- a/react-redux/src/App.js +++ b/react-redux/src/App.js @@ -1,4 +1,5 @@ import "./App.css"; +import Study from "./Study"; const Head = (props) =>
-
+
; + +class Study extends Component { + constructor(props) { + super(props); + this.state = { + loading: true, + }; + } + + comment() { + const { loading } = this.state; + const con = 1; + const res = con > 0 ? true : false; // 두가지 조건 (if, else) + const and = loading &&
; // 한가지 조건(if)
+ }
+ render() {
+ const { loading } = this.state;
+ return (
+ <>
+ {loading ?
}
+ {loading &&