개인공부/반딧불2 [react] twittler-state-props 의사코드 sidebar.js import React from 'react'; import { Link } from 'react-router-dom'; const Sidebar = () => { return( ); }; export default Sidebar; /* 의사코드포함 */ import React from 'react'; import { Link } from 'react-router-dom'; //Link컴포넌트가 쓰일거라서 작성한다. const Sidebar = () => { return( //사이드바에 밑의 아이콘들이 존재한다 //link는 to속성을 이용해서 path주소를 연결해준다. //tweet아이콘의 link컴포넌트는 /으로 연결된다. 이게 첫화면이된다. //about아이콘의 link컴포넌트는.. 2023. 1. 27. 객체지향프로그래밍 # 객체지향프로그래밍 하나의 모델이 되는 청사진을 만들고, 그 청사진을 바탕으로 한 객체를 만드는 프로그래밍 패턴이다. 캡슐화(은닉화), 추상화, 상속(가장중요), 다형성 # 프로토타입 체인: 자바스크립트에서 상속을 구현할때 사용.(extends, super사용) #extends Bee constructor() super() 이렇게 하면 Bee꺼를 다 상속받는 다는 의미이다! class Car{ construction(brand, name, color){ this.brand = brand; this.name = name; this.color = color; drive(){ console.log(this.name + '가 운전을 시작합니다'); } } let avante = new Car('hyundai'.. 2023. 1. 16. 이전 1 다음