ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Wingle] ๊ตญ์ œ ๊ต๋ฅ˜ ์ปค๋ฎค๋‹ˆํ‹ฐ ๊ฐœ๋ฐœ ํ”„๋กœ์ ํŠธ ๊ฐœ๋ฐœ ์ •๋ฆฌ
    React 2023. 9. 8. 02:05

     



    ๐Ÿ“… ํ”„๋กœ์ ํŠธ ๊ธฐ๊ฐ„

    • 2023.3.26 ~ 2023.8.25

     

    ๐ŸŒŸ ๊ฒฐ๊ณผ๋ฌผ

    ๋ฐฐํฌ ์‚ฌ์ดํŠธ

     

    GITHUB

    2023.8.29 ๊ธฐ์ค€ 39๋ช…์˜ ์œ ์ € ํ™•๋ณด ๋ฐ ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ์ˆ˜๋ ด

     

     

     

    ๐Ÿง‘๐Ÿป‍๐Ÿ’ป  ์—ญํ• 

    - ํ”„๋ก ํŠธ์—”๋“œ ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ ๋ฐ ๋ฐฉํ–ฅ ์„ค์ •, ํ”„๋ก ํŠธ์—”๋“œ ํšŒ์˜ ์ฃผ๋„, ํ”„๋กœ์ ํŠธ ๊ธฐํš ๋ฐ ์„ธ๋ถ€ ๊ธฐ๋Šฅ ์„ค์ •
    - MVP ๋ฒ„์ „ ๋งˆ์ดํŽ˜์ด์ง€,ํ”„๋กœํ•„, ๋กœ๋”ฉ ์ปดํฌ๋„ŒํŠธ UI ํ™”๋ฉด ๊ตฌ์ƒ ๋ฐ ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ ์ œ์ž‘

    - ๊ณ„์ • ๊ด€๋ จ ์ •๋ณด ํ˜ธ์ถœ ๋ฐ ๊ณ„์ • ์ •๋ณด Edit ๊ธฐ๋Šฅ ๊ตฌํ˜„

     

    1. ๋‹‰๋„ค์ž„ ๋ฐ ์‚ฌ์ง„ ์ˆ˜์ •

    - ๋‹‰๋„ค์ž„ ์ค‘๋ณต ๋ฐ ์‚ฌ์ง„ ํŒŒ์ผ ํฌ๊ธฐ ํ™•์ธ

    - useMutation์€ ์„œ๋ฒ„์— ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์—…๋ฐ์ดํŠธํ•˜๋Š” ์ž‘์—…์„ ์ฒ˜๋ฆฌ

     

    mypage- nickname

    2. ๊ด€์‹ฌ์‚ฌ ๋ฐ ์–ธ์–ด ์„ ํƒ

    [์–ธ์–ด]

    - <์„ ํƒ ์ดˆ๊ธฐํ™”> ๋ฒ„ํŠผ ํด๋ฆญ์‹œ ์ €์žฅ๋œ ์–ธ์–ด ์ •๋ณด๊ฐ€ ๋ฆฌ์…‹

    - ์„ ์ˆœ์œ„๊ฐ€ ์„ ํƒ๋˜์–ด์•ผ ํ›„ ์ˆœ์œ„ ์„ ํƒ ๊ฐ€๋Šฅ

     

    [๊ด€์‹ฌ์‚ฌ]

    - ์ค‘๋ณต ํด๋ฆญ์‹œ ์„ ํƒ ํ•ด์ œ, ํด๋ฆญ์‹œ ์„ ํƒ

    mypage - edit (๊ด€์‹ฌ์‚ฌ,์–ธ์–ด)

    3. ํƒ€์ธ ํ”„๋กœํ•„

    - ์ฟผ๋ฆฌ์—์„œ ์‚ฌ์šฉ์ž ID ๋ฅผ ๊ฐ€์ ธ์™€์„œ ์‚ฌ์šฉ์ž ์ •๋ณด ํ˜ธ์ถœ

    profile

    ๐Ÿ‘ฉ๐Ÿป‍๐Ÿ”ง ๊ธฐ์ˆ  ์Šคํƒ

     

     

    ๐Ÿ“บ ํ™”๋ฉด ์„ค๊ณ„์„œ

     

    ๐Ÿ“„ API ๋ช…์„ธ์„œ

     

     

    ๐ŸŒŸ ์ฝ”๋”ฉ ์ปจ๋ฒค์…˜

    1. Common
      • ๋„ค์ด๋ฐ ๊ธ€์ž ๊ธธ์ด : 20์ž ์ด๋‚ด (20์ž ์ด์ƒ์€ ํŒ€์›๊ณผ ์ƒ์˜)
      • ์œ ํ˜•๋ณ„ ๋„ค์ด๋ฐ ๊ทœ์น™
        • Default : camelCase
        • Folder, File names : lowerCamelCase
        • Component names : PascalCase
        • Function names : lowerCamelCase, ๋™์‚ฌ + ๋ช…์‚ฌ (์˜ˆ: getUserInformation)
        • Constant names : CONSTANT_CASE
    2. React
      • ํ•จ์ˆ˜ํ˜• ์ปดํฌ๋„ŒํŠธ ์‚ฌ์šฉ
      • ๋ฉ”๋ชจ์ด์ œ์ด์…˜ ๊ถŒ์žฅ
      • ์ด๋ฒคํŠธ ํ•จ์ˆ˜ ๋„ค์ด๋ฐ : handle + event / const handleOnClickAlarm = () => { ... }
      • ํ•จ์ˆ˜ ์„ ์–ธ : ์„ ์–ธ์‹์œผ๋กœ ์ž‘์„ฑํ•˜๋˜, ํ‘œํ˜„์‹์„ ์‚ฌ์šฉํ•ด์•ผ ํ•  ๊ฒฝ์šฐ(ํด๋กœ์ €, ์ฝœ๋ฐฑํ•จ์ˆ˜ ๋“ฑ) ํ™”์‚ดํ‘œ ํ•จ์ˆ˜ ์‚ฌ์šฉ
    3. Styled-Components
      • ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ ํŒŒ์ผ์— ์Šคํƒ€์ผ ์ •์˜
      • ๋„ค์ด๋ฐ : S-dot ํŒจํ„ด ์‚ฌ์šฉ (์˜ˆ: `const Wrapper = styled.div``)
    4. Recoil
      • ๋ฌด๋ถ„๋ณ„ํ•œ ์ „์—ญ์ƒํƒœ ์‚ฌ์šฉ ๊ธˆ์ง€ : ๋‹ค์ˆ˜์˜ ์ปดํฌ๋„ŒํŠธ ๊ฐ„์— ์ƒํƒœ ์˜์กด์„ฑ์ด ๋†’์•„์งˆ ๋•Œ๋งŒ ์ „์—ญ์ƒํƒœ๋กœ ๋ฐ์ดํ„ฐ ๊ด€๋ฆฌ(์ผ๋ฐ˜์ ์ธ ๊ฒฝ์šฐ ์ง€์—ญ์ƒํƒœ๋กœ ๊ด€๋ฆฌ)
      • ๋„ค์ด๋ฐ : StateAtom ์ถ”๊ฐ€ / export const imgModalStateAtom = atom({ ... })
    5. TypeScript
      • ๋„ค์ด๋ฐ : PascalCase ์‚ฌ์šฉ, I/T prefix ์‚ฌ์šฉ ๊ธˆ์ง€
      • Type alias์™€ interface ์‚ฌ์šฉ (API ๋ฐ์ดํ„ฐ ๋“ฑ)

    โœ”๏ธ ์ปค๋ฐ‹ ๊ทœ์น™

    ์ด์Šˆ ์ž‘์„ฑ ๊ทœ์น™

    ๊ธฐ๋ณธ ํ˜•์‹ : [#์ด์Šˆ๋ฒˆํ˜ธ -] [commit type]: [commit message] ์˜ˆ์‹œ : #1 - feat: ๋กœ๊ทธ์ธ

    ์ฝ”๋”ฉ ์ปจ๋ฒค์…˜

      1. Common
      • ๋„ค์ด๋ฐ ๊ธ€์ž ๊ธธ์ด : 20์ž ์ด๋‚ด(20์ž ์ด์ƒ ํŒ€์›๊ณผ ์ƒ์˜)
      • ์œ ํ˜•๋ณ„ ๋„ค์ด๋ฐ ๊ทœ์น™
      ๐Ÿ’ก Default : camelCase Folder, File names : lowerCamelCase Component Function names : PascalCase Function names : lowerCamelCase, verb + noun(ex: getUserInformation) Constant names : CONSTANT_CASE
      1. React
        • ๋ฉ”๋ชจ์ด์ œ์ด์…˜ ๊ถŒ์žฅ
        • ํ•จ์ˆ˜ ์„ ์–ธ : ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๋กœ ์„ ์–ธ
      • ํ•จ์ˆ˜ํ˜• ์ปดํฌ๋„ŒํŠธ ์ž‘์„ฑ์‹œ → export default function Example() {}
      • ์ปดํฌ๋„ŒํŠธ ๋‚ด๋ถ€์— ์žˆ๋Š” ํ•จ์ˆ˜ ์ž‘์„ฑ ์‹œ → const Example () ⇒ {}
        • ์ด๋ฒคํŠธ ํ•จ์ˆ˜ ๋„ค์ด๋ฐ : handle + event / const handleOnClickAlarm = () => { ... }
      1. Styled-Components
        • ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ ํŒŒ์ผ์— ์ •์˜
        • ๋„ค์ด๋ฐ(S-dot)
      2. Recoil
        • ๋ฌด๋ถ„๋ณ„ํ•œ ์ „์—ญ์ƒํƒœ ์‚ฌ์šฉ ๊ธˆ์ง€ : ๋‹ค์ˆ˜์˜ ์ปดํฌ๋„ŒํŠธ๊ฐ„์— ์ƒํƒœ ์˜์กด์„ฑ์ด ๋†’์•„์งˆ๋•Œ๋งŒ ์ „์—ญ์ƒํƒœ๋กœ ๋ฐ์ดํ„ฐ ๊ด€๋ฆฌ(์ผ๋ฐ˜์ ์ธ ๊ฒฝ์šฐ ์ง€์—ญ์ƒํƒœ๋กœ ๊ด€๋ฆฌ)
        • ๋„ค์ด๋ฐ : StateAtom ์ถ”๊ฐ€ / export const imgModalStateAtom = atom({...})
      3. TypeScript
      • naming : PascalCase ์‚ฌ์šฉ, I/T prefix ์‚ฌ์šฉ ๊ธˆ์ง€
      • type alias + interface(API Data)
      • ์ถฉ๋Œ์„ฑ ์˜ค๋ฅ˜๋กœ ๋‘˜ ์ค‘ ํ•˜๋‚˜์˜ ๋ฐฉ์‹๋งŒ → type ๋ฐฉ์‹์œผ๋กœ ์“ฐ๊ธฐ๋กœ ๊ฒฐ์ •
      • interface ๋กœ ๋˜์–ด ์žˆ๋Š” ์ฝ”๋“œ type ์œผ๋กœ ์ˆ˜์ •ํ•ด์ฃผ๊ธฐ
Designed by Tistory.