SlideShare a Scribd company logo
1 of 15
Download to read offline
웹 디자인:
kokoto에서의
React,
CSS Modules
React란
무엇인가?
1
왜 컴포넌트인가?
똑같은 코드를
또다시
작성할 필요가
없어진다
재사용성
컴포넌트가
하는 일이
명확해지면서
코드에
집중할 수 있다
관심사의 분리
변수 이름 등이
지역화되면서
같은 변수명을
여러 곳에서
사용할 수 있다
지역화
React란
무엇인가?
1
Plain HTML
Template
Engine
 컴포넌트화가 불가능에 가깝다
 <iframe>, <object> 태그??
 컴포넌트 안에 스크립트와 스타일을
포함하는 것이 가능해짐
 구조는 분리 가능 (mixin)
 스크립트나 스타일은 분리 불가
React
React란
무엇인가?
1
어떻게 컴포넌트화하는가?
이것만으로다양한상황에대처가능!
React란
무엇인가?
1
부모로부터 상속받는 속성(props)이 바뀌거나,
컴포넌트의 상태(state)가 바뀌면 업데이트
손쉽게 동적인 사용자 인터페이스의 구현이 가능
레벨이바뀌니까실제표시화면에도적용되네!
CSS
무엇이
문제인가?
2
CSS: Cascading Style Sheets
클래스와선택자의1:1매칭
CSS
무엇이
문제인가?
2
문제 발생
‘small’이라는 클래스 이름
너무 일반적인 이름이라서, 재사용 문제
해결책 1
CSS의 상속 기능 사용
전역 이름공간의 오염
“user-info의자식중
small을선택”
2
너~무 길다!
CSS
무엇이
문제인가?
문제 발생
2
 보기에 안 좋다.
 성능이 떨어진다.
(label 중 부모가 row 중 부모가 info 중…)
 스타일 재사용이 불가능하다.
 구조가 변경되면 스타일시트도 바뀐다.
CSS
무엇이
문제인가?
2
해결책 2
특징적인 이름을 (길더라도) 따로 붙인다.
CSS
무엇이
문제인가?
2
해결책 2
특징적인 이름을 (길더라도) 따로 붙인다.
 상대적으로 나은 방법 (재사용, 구조 문제 해결)
 일반적인 이름을 사용하지 못해서 불편하다.
 일일이 이름을 생각해내야 한다.
CSS
무엇이
문제인가?
3
CSS ModulesCSS
Modules
 CSS의 이름공간 포화를 막기 위한 대안
 CSS를 자동으로 모듈화해줌으로써
대부분의 문제로부터 벗어날 수 있다
CSS선택자는간결하게구성
자바스크립트모듈을
불러올때와같은문법
클래스의이름은
style객체의키이름으로
3
CSS
Modules
실제로 구성된 화면
3
CSS
Modules
어떻게 구성하는가?
3
CSS
Modules
 webpack.config.js에 설정
 [파일이름]__[클래스이름]__[base64 인코딩]
 자유롭게 설정 변경 가능

More Related Content

Viewers also liked

Hoptoys- Revue de presse novembre 2016 janvier 2017
Hoptoys- Revue de presse novembre 2016   janvier 2017Hoptoys- Revue de presse novembre 2016   janvier 2017
Hoptoys- Revue de presse novembre 2016 janvier 2017Julien Servy
 
Conception et fabrication assisté par l’ordinateur
Conception et fabrication assisté par l’ordinateurConception et fabrication assisté par l’ordinateur
Conception et fabrication assisté par l’ordinateurSKYWARE COMPAGNY
 
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining Lolita Liao
 
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...E-Commerce Berlin EXPO
 
Air Pollution - control methods
Air Pollution - control methodsAir Pollution - control methods
Air Pollution - control methodsJawahar Saud
 
Free Clean Template for your Webinars (by Livestorm)
Free Clean Template for your Webinars (by Livestorm)Free Clean Template for your Webinars (by Livestorm)
Free Clean Template for your Webinars (by Livestorm)Livestorm
 
Presentación paz
Presentación pazPresentación paz
Presentación pazmez mez
 
Key isi guerrilla handler on akhtar abdul rehman
Key isi guerrilla handler on akhtar abdul rehmanKey isi guerrilla handler on akhtar abdul rehman
Key isi guerrilla handler on akhtar abdul rehmanAgha A
 

Viewers also liked (10)

Hoptoys- Revue de presse novembre 2016 janvier 2017
Hoptoys- Revue de presse novembre 2016   janvier 2017Hoptoys- Revue de presse novembre 2016   janvier 2017
Hoptoys- Revue de presse novembre 2016 janvier 2017
 
Conception et fabrication assisté par l’ordinateur
Conception et fabrication assisté par l’ordinateurConception et fabrication assisté par l’ordinateur
Conception et fabrication assisté par l’ordinateur
 
Actividad 1.3 Corrientes Economicas
Actividad 1.3 Corrientes EconomicasActividad 1.3 Corrientes Economicas
Actividad 1.3 Corrientes Economicas
 
BRAID Executive Summary
BRAID Executive  SummaryBRAID Executive  Summary
BRAID Executive Summary
 
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining
Ungerground mechanized-longwall-shortwall-adit-mining-technology Hot- Mining
 
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...
E-commerce Berlin Expo 2017 - Step up your B2B game – a case study with trans...
 
Air Pollution - control methods
Air Pollution - control methodsAir Pollution - control methods
Air Pollution - control methods
 
Free Clean Template for your Webinars (by Livestorm)
Free Clean Template for your Webinars (by Livestorm)Free Clean Template for your Webinars (by Livestorm)
Free Clean Template for your Webinars (by Livestorm)
 
Presentación paz
Presentación pazPresentación paz
Presentación paz
 
Key isi guerrilla handler on akhtar abdul rehman
Key isi guerrilla handler on akhtar abdul rehmanKey isi guerrilla handler on akhtar abdul rehman
Key isi guerrilla handler on akhtar abdul rehman
 

Similar to 20170202 D2 발표

C Language II
C Language IIC Language II
C Language IISuho Kwon
 
01 introduce-react-js
01 introduce-react-js01 introduce-react-js
01 introduce-react-jsJay Lee
 
웹표준의 이해
웹표준의 이해웹표준의 이해
웹표준의 이해Leehooan
 
[스프링 스터디 1일차] 템플릿
[스프링 스터디 1일차] 템플릿[스프링 스터디 1일차] 템플릿
[스프링 스터디 1일차] 템플릿AnselmKim
 
신입 웹 개발자 포트폴리오 / 댓글 게시판
신입 웹 개발자 포트폴리오 / 댓글 게시판신입 웹 개발자 포트폴리오 / 댓글 게시판
신입 웹 개발자 포트폴리오 / 댓글 게시판hyeonjae Cheon
 
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기XpressEngine
 
[EWD2014]CLASS05
[EWD2014]CLASS05[EWD2014]CLASS05
[EWD2014]CLASS05JY LEE
 
[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기NAVER D2
 
Patterns for effectviely documenting frameworks
Patterns for effectviely documenting frameworksPatterns for effectviely documenting frameworks
Patterns for effectviely documenting frameworksSunuk Park
 
ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기Taegon Kim
 
React를 이용하여 멀티플랫폼에서 개발하기
React를 이용하여 멀티플랫폼에서 개발하기React를 이용하여 멀티플랫폼에서 개발하기
React를 이용하여 멀티플랫폼에서 개발하기WebFrameworks
 
Developer`s Web Standard
Developer`s Web StandardDeveloper`s Web Standard
Developer`s Web StandardSangHoon Han
 
Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까? Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까? Kim Hunmin
 
리액트 적용기
리액트 적용기리액트 적용기
리액트 적용기Hun Yong Song
 
초보개발자의 TDD 체험기
초보개발자의 TDD 체험기초보개발자의 TDD 체험기
초보개발자의 TDD 체험기Sehun Kim
 

Similar to 20170202 D2 발표 (20)

C Language II
C Language IIC Language II
C Language II
 
01 introduce-react-js
01 introduce-react-js01 introduce-react-js
01 introduce-react-js
 
1.react 101
1.react 1011.react 101
1.react 101
 
웹표준의 이해
웹표준의 이해웹표준의 이해
웹표준의 이해
 
[스프링 스터디 1일차] 템플릿
[스프링 스터디 1일차] 템플릿[스프링 스터디 1일차] 템플릿
[스프링 스터디 1일차] 템플릿
 
React
ReactReact
React
 
신입 웹 개발자 포트폴리오 / 댓글 게시판
신입 웹 개발자 포트폴리오 / 댓글 게시판신입 웹 개발자 포트폴리오 / 댓글 게시판
신입 웹 개발자 포트폴리오 / 댓글 게시판
 
Design patterns
Design patternsDesign patterns
Design patterns
 
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기
XECon2015 :: [2-2] 박상현 - React로 개발하는 SPA 실무 이야기
 
[EWD2014]CLASS05
[EWD2014]CLASS05[EWD2014]CLASS05
[EWD2014]CLASS05
 
[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기[D2 campus]착 하면 척! chak 서비스 개발기
[D2 campus]착 하면 척! chak 서비스 개발기
 
Bounded Context
Bounded ContextBounded Context
Bounded Context
 
Patterns for effectviely documenting frameworks
Patterns for effectviely documenting frameworksPatterns for effectviely documenting frameworks
Patterns for effectviely documenting frameworks
 
ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기ReactJS로 시작하는 멀티플랫폼 개발하기
ReactJS로 시작하는 멀티플랫폼 개발하기
 
React를 이용하여 멀티플랫폼에서 개발하기
React를 이용하여 멀티플랫폼에서 개발하기React를 이용하여 멀티플랫폼에서 개발하기
React를 이용하여 멀티플랫폼에서 개발하기
 
Developer`s Web Standard
Developer`s Web StandardDeveloper`s Web Standard
Developer`s Web Standard
 
7 8 1
7 8 17 8 1
7 8 1
 
Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까? Facebook은 React를 왜 만들었을까?
Facebook은 React를 왜 만들었을까?
 
리액트 적용기
리액트 적용기리액트 적용기
리액트 적용기
 
초보개발자의 TDD 체험기
초보개발자의 TDD 체험기초보개발자의 TDD 체험기
초보개발자의 TDD 체험기
 

Recently uploaded

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 

Recently uploaded (6)

A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 

20170202 D2 발표