๊นํ๋ธ ์ ์ฅ์ ๋ง๋ค๊ธฐ
์ ์ฅ์ url ๋ณต์ฌ ํด ๋๊ธฐ
๋ฆฌ์กํธ ์ฑ ๋ค์ด
npx create-react-app twinkle
VSC์์ twinkle ์ด๊ธฐ
cd twinkle
๊น์ ์ถ๊ฐํ๊ธฐ
git remote add origin ๊นํ๋ธ์ ์ฅ์url
ํ์ ์๋ ํ์ผ ์ญ์ ํ๊ธฐ
์ปค๋ฐํ๊ธฐ
git add .
git commit -m "Setup react"
git push origin master
๊ตฌ๊ธ ์์ด๋ ๋ก๊ทธ์ธ
๋ก๊ทธ์ธํ ๋ค๋น ๋ฐ ์ผ์ชฝ์ ์๋ ์ฝ์๋ก ์ด๋ ํด๋ฆญ

ํ๋ก์ ํธ ๋ง๋ค๊ธฐ ํด๋ฆญ
3-1. ํ๋ก์ ํธ ์ด๋ฆ ์ ํ๊ธฐ
3-2. ์ด ํ๋ก์ ํธ์์ ๊ตฌ๊ธ ์ ๋๋ฆฌํฑ์ค ์ฌ์ฉ ์ค์ ์ฒดํฌ๋ ์ผ๋จ์ ํด์ ํ๊ณ ๋์ด๊ฐ์
์๊ธ์ ํ ๋ฒ ์ฒดํฌํ๊ณ ..^^! ์์ง์ ๋ฌด๋ฃ๋ค!

app์ ์ถ๊ฐํ๊ธฐ ์ํด ํ๋ซํผ ์ ํํ๊ธฐ (ios/android/web//unity)
์น์ ์ ํํฉ์๋ค.


6-2. Firebase SDK(Software Development Kit) ์ถ๊ฐ

6-2-1. npm install firebase
(v 9.9.6)๋ถํฐ๋ ์๋ ๋ฐฉ๋ฒ์ผ๋ก ์งํ
6-2-2. firebase์ํ ํ์ผ ์์ฑ: /src/firebase.js
firebase configuration์ ์ ํ๊ฑฐ ๋ณต์ฌํด์ ๋ถ์ฌ ๋ฃ๊ณ export defaultํ๊ธฐ
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: ""
};
//๊ทธ๋ฆฌ๊ณ ์ต์คํฌํธํ๊ธฐ
export default initializeApp(firebaseConfig);
6-2-3. index.js์ firebase importํ๊ธฐ
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import firebase from './firebase';
//์ ๊ฐ์ ธ์ ์ง๋์ง ์์๋ณด๊ธฐ ์ํด firebase ์ฝ์์ ์ฐ์ด๋ณด๊ธฐ
console.log(firebase)
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
์ค์ผ์ด ์ ์๋ํ๋ค.
6-2-4. ์ฝ์๋ก ์ด๋ ํด๋ฆญ!