Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- state hook
- npm 에러
- .env
- 개발공부
- CORS
- styled-component
- 노마드코더
- 그래머인유즈
- 실행컨텍스트 동작과정
- 실행컨텍스트콜스택
- useRef역할
- 영어
- 로컬상태
- CLI
- css
- .current
- 개발일기
- 알고리즘
- 전역상태
- 실행컨텍스트 면접
- 실행컨텍스트자바스크립트
- 객체
- 실행컨텍스트스택
- 실행컨텍스트란
- Mini Node Server
- html
- 영어공부
- 실행컨텍스트 실행과정
- Block
- 고차함수
Archives
- Today
- Total
오늘도 삽질중
Local Storage(setItem, getItem, removeItem) 본문
브라우저에서 공짜로 뭔가를 기억할 수 있게 해주는 기능이 있는데
그것이 바로 Local Storage이다.
local Storage: 브라우저에 뭔가를 저장할 수 있게 해주고 나중에 가져다 쓸 수도 있게 해준다.
local Storage에 뭔가가 들어있는지 보고싶다면 개발자 도구를 이용하면 된다.
(inspect->application->local Storage)
1) setItem: local Storage에 정보를 저장한다
->localStorage.setItem("key",value)
2) getItem: local Storage에 저장되어있는 정보를 가져온다
-> localStorage.getItem("key")
3) remove: local Storage에 저장된 정보를 제거한다
-> localStorage.removeItem("key")
console을 통해
'개발공부' 카테고리의 다른 글
Create React App(리액트 프로젝트 만들기) (0) | 2021.09.15 |
---|---|
로그인2 (getting username) (0) | 2021.07.05 |
로그인하기 submit event.preventDefault() (0) | 2021.06.30 |
toggle로 가는 여정(toggle, classList, className) (4) | 2021.06.28 |