useful Memo for redux

Seonmi Choi·2021년 8월 12일
0

Start again!!!

목록 보기
24/40

export 하고 export default 하고 차이점
불러올때 {} 이 괄호를 써야하는지 안쓰는지가 차이

만약에 export const subscribers = ##### 로 내보내기를 하면 불러올때 import {subscribers} from './#####' 이렇게 불러와야하고

export default subscribers 로 내보냈으면 그냥 괄호 없이 import subscribers from './######' 불러올 수 있다

let a = [1, 2, 3];
let copy1 = [...a];
let copy2 = a.slice();
let copy3 = a.concat();
이것들이 카피를 해오는데 원본을 바꾸지 않고 가지고 온다
push (add an item to the end)
pop (remove an item from the end)
shift (remove an item from the beginning)
unshift (add an item to the beginning)
sort
reverse
splice
얘네들은 원본을 바꾸는 메소드들

profile
I am not afraid of learning!

0개의 댓글