uuid는 소프트웨어 구축에 쓰이는 식별자 표준이다.
uuidsms 32개의 16진수로 표현되며 총 36개의 문자로 된 8-4-4-4-12라는 5개의 그룹을 하이픈으로 구분한다.
2.71 * 10^18 개의 UUID를 생성했을 때 최소 1개가 중복(충돌) 될 확률이 약 50%라고 한다.
그러므로 uuid가 중복될 걱정은 안하고 고유값으로 사용해도 될 것이다.
uuid 생성
npm install uuid
uuid를 생성하려면 먼저 uuid 패키지를 받는다.
import {v4 as uuidv4} from 'uuid';
uuidv4();
import 한 후 uuidv4() 함수를 실행하면 uuid를 생성해준다.
https://nerd-lee.github.io/styled-components/0001/
npm 사용시
- npm i styled-components
yarn 사용시
- yarn add styled-components
yarn create react-app todo08
yarn add redux react-redux
npm
npm install react-router-dom
yarn
yarn add react-router-dom
yarn add react-redux @reduxjs/toolkit
yarn add json-server
yarn json-server --watch db.json --port 3001
npm install react-icons
yarn add react-icons