Giter Site home page Giter Site logo

story-front's Introduction

EP.1 메인 헀더 생성

μ˜€λŠ˜μ€ 메인 ν—€λ”λ§Œ 생성을 ν–ˆλ‹€. ν•œκ°€μ§€ μ΄μŠˆκ°€ μžˆλ‹€λ©΄ svg νŒŒμΌμ„ react component ν˜•μ‹μœΌλ‘œ λΆˆλŸ¬μ˜€λŠ”λ° μ‹€νŒ¨ν•΄μ„œ 그게 아쉬웠닀. 일단 μ»΄ν¬λ„ŒνŠΈλ‘œ 직접 μƒμ„±ν•΄μ„œ μž‘μ—…μ„ μ§„ν–‰ν–ˆλ‹€.

EP.2 이메일 인증

μ˜€λŠ˜μ€ 이메일 인증을 κ΅¬ν˜„ν–ˆλ‹€. 일단 폼은 λ‹€ κ΅¬ν˜„ν–ˆκ³  μ‹€μ œ API ν…ŒμŠ€νŠΈλ₯Ό ν•˜λ©΄ 될 것 κ°™λ‹€.

EP.3 μ½”λ“œ 이메일 인증

μ˜€λŠ˜μ€ μ½”λ“œ 이메일 인증을 ν–ˆλ‹€. μƒλ‹Ήνžˆ μ‰½κ²Œ 인증을 ν•˜μ˜€κ³ , 였λ₯˜ λ©”μ„Έμ§€λŠ” toast UI둜 보여 쀄 μ˜ˆμ •μ΄λ‹€. μ—¬κΈ°μ„œ μΆ”κ°€μ μœΌλ‘œ 적용? κ³ λ―Ό? ν•΄μ•Όν•˜λŠ” λ¬Έμ œκ°€ μžˆλ‹€.

  1. refresh, access ν† ν°μ˜ 관리
  2. 인증 ν›„ μœ μ € 정보λ₯Ό κ°€μ Έμ˜€λŠ” 것

일단 인증 ν›„ μœ μ € 정보λ₯Ό κ°€μ Έμ˜€λŠ”κ±΄ 이메일 μΈμ¦μ—μ„œλŠ” ν΄λΌμ΄μ–ΈνŠΈ μ‚¬μ΄λ“œμ—μ„œ μœ μ € 정보λ₯Ό κ°€μ Έμ˜€λŠ” κ²ƒμœΌλ‘œ ν•΄κ²°ν•˜λ©΄ 될 것 κ°™κ³  λ‚˜λ¨Έμ§€ μœ μ € μ •λ³΄λŠ” 음... μ„œλ²„μ‚¬μ΄λ“œμ—μ„œ store둜 λ„£μ–΄μ£ΌλŠ” λ°©μ‹μœΌλ‘œ 할지 κ³ λ―Όμ΄λœλ‹€.

그리고 ν† ν°μ˜ κ΄€λ¦¬λŠ” 일단 2가지λ₯Ό μƒκ°ν•˜κ³  μžˆλŠ”λ°, μ²«λ²ˆμ§ΈλŠ” μŠ€ν† λ¦¬μ§€ APIλ₯Ό μ‚¬μš©ν•˜λŠ”κ±° λ‘λ²ˆμ§ΈλŠ” μ„Έμ…˜μœΌλ‘œ κ΄€λ¦¬ν•˜λŠ”κ±΄λ°.... 고민이 λœλ‹€.

였늘 ν•œ 일

  • 이메일 인증

EP.4 write νŽ˜μ΄μ§€ 좔가및 μ„œλ²„ μ‚¬μ΄λ“œ λ Œλ”λ§ store 연동 μˆ˜μ •

μž‘μ„±νŽ˜μ΄μ§€λ° μŠ€ν† μ–΄ 연동 μˆ˜μ •μ„ ν–ˆλ‹€. 그리고 redux sagaλŠ” μ‚¬μš©ν•˜μ§€ μ•Šμ„ μ˜ˆμ •μ΄λ‹€.

EP.5 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (1)

μ˜€λŠ˜μ€ 글을 μž‘μ„±ν•˜λŠ” νŽ˜μ΄μ§€λ₯Ό μž‘μ—…ν•˜κ³  μžˆμ—ˆλ‹€. κ°œλ°œμ„ μ§„ν–‰ν•˜λ©΄μ„œ λ°œμƒν–ˆλ˜ μ΄μŠˆλŠ” next.jsμ—μ„œ code mirrorλ₯Ό 호좜 ν•  λ•Œ μ—λŸ¬λ₯Ό λ°œμƒν•˜λŠ” μ΄μŠˆκ°€ μžˆμ—ˆλ‹€. CodeMirror Issue - Navigator error

μ„œλ²„ μ‚¬μ΄λ“œ λ Œλ”λ§μ„ ν•˜λ©΄μ„œ μ½”λ“œ 미러λ₯Ό λͺ»μ½μ–΄ λ°œμƒν•˜λŠ” 이슈인 것 κ°™λ‹€. 해결은 μ„œλ²„ μ‚¬μ΄λ“œμ—μ„œ λ°œμƒν•˜λŠ” 이슈이면 ν΄λΌμ΄μ–ΈνŠΈ μ‚¬μ΄λ“œ λ Œλ”λ§μ‹œ λ‘œλ“œλ₯Ό ν•˜κ²Œν•˜λ©΄ κ³ μΉ  수 μžˆλŠ” μ—λŸ¬μ˜€λ‹€.

  initialize = () => {
    if (!this.editorElement.current) return;
    const CodeMirror = require('codemirror');
    require('codemirror/mode/markdown/markdown');
    require('codemirror/mode/javascript/javascript');
    require('codemirror/mode/jsx/jsx');
    require('codemirror/addon/display/placeholder');
    this.codemirror = CodeMirror.fromTextArea(this.editorElement.current, {
      mode: 'markdown',
      theme: 'one-light',
      placeholder: 'λ‹Ήμ‹ μ˜ 이야기λ₯Ό μ μ–΄λ³΄μ„Έμš”...',
      lineWrapping: true,
    });
  };

  componentDidMount() {
    this.initialize();
  }

λ‹€μŒλ²ˆμ—λŠ” 계속 에디터 μž‘μ—…μ„ κ³„μ†ν•˜λ©΄ 될 것 κ°™λ‹€.

EP.6 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (2)

μ˜€λŠ˜λ„ 글을 μž‘μ„±ν•˜λŠ” νŽ˜μ΄μ§€λ₯Ό μž‘μ—…ν–ˆλ‹€. μ˜€λŠ˜μ€ λ¬΄λ‚œν•˜κ²Œ μž‘μ—…μ„ ν•œ 것 κ°™λ‹€. λ‹€μŒμ—λ„ μ΄μ–΄μ„œ κΈ€ μž‘μ„± νŽ˜μ΄μ§€λ₯Ό μž‘μ—… ν•  μ˜ˆμ •μ΄λ‹€.

EP.7 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (3)

아직 에디터 μž‘μ„± νŽ˜μ΄μ§€λ₯Ό μž‘μ—…μ€‘μ΄λ‹€. ν˜„μž¬ νƒœκ·Έ μž…λ ₯및 λ§ˆν¬λ‹€μš΄ κΈ°λŠ₯을 μΆ”κ°€ν–ˆκ³  λ‚΄μΌλΆ€ν„°λŠ” preview κΈ°λŠ₯을 κ΅¬ν˜„ν•˜λ©΄ 될 것 κ°™λ‹€. 그리고 이미지 μ—…λ‘œλ“œ κΈ°λŠ₯, μž„μ‹œμ €μž₯, κΈ€ μˆ˜μ •, μ €μž₯ κΈ°λŠ₯을 κ΅¬ν˜„ν•˜λ©΄ μž‘μ„± νŽ˜μ΄μ§€λ„ 마무리λ₯Ό ν•  것 κ°™λ‹€.

였늘 ν•œ 일

  • νƒœκ·Έ μž…λ ₯
  • λ§ˆν¬λ‹€μš΄ 적용

EP.8 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (4)

λ§ˆν¬λ‹€μš΄ 프리뷰 κ΅¬ν˜„

였늘 ν•œ 일

  • λ§ˆν¬λ‹€μš΄ 프리뷰 적용

EP.9 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (5)

μ˜€λŠ˜μ€ react queryλ₯Ό ν†΅ν•΄μ„œ 포슀트 정보λ₯Ό κ°€μ Έμ™€μ„œ μ„œλ²„ μ‚¬μ΄λ“œ λ Œλ”λ§μ„ 적용 ν• λ €κ³  ν–ˆλŠ”λ°... 음 μž˜μ•ˆλ˜λŠ” 것 κ°™λ‹€. ν˜„μž¬ λ°œμƒν•˜λŠ” μ΄μŠˆλŠ”

SerializableError: Error serializing `.dehydratedState.queries[0].state.data.config.transformRequest[0]` returned from `getServerSideProps`

μ΄λΌλŠ” μ—λŸ¬κ°€ λ°œμƒν•˜λŠ”λ° 이게 nextjsμ—μ„œ μ œκ³΅ν•˜λŠ” λ‹€μ΄λ‚˜λ―Ή apiλ₯Ό μ‚¬μš©ν•΄μ„œ λ°œμƒν•˜λŠ” μ΄μŠˆμΈμ§€ μ•„λ‹ˆλ©΄ nextjsμ—μ„œ react queryλ₯Ό μ‚¬μš©ν•˜λŠ”λ° μ΄μŠˆκ°€ μžˆλŠ”κ±΄μ§€ 찾아봐야겠닀.

μ΄κ²ƒλ§Œν•˜λ©΄ footer λΆ€λΆ„ν•˜κ³  등둝 UIλ₯Ό λ§Œλ“€λ©΄ μ‹€μ œ μž‘μ„±ν•˜λŠ” νŽ˜μ΄μ§€λŠ” λμ΄λ‚œλ‹€.

EP.10 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (6) - react-query μ—μ„œ swr둜 λ³€κ²½

κ²°κ΅­ μ–΄μ œ λ°œμƒν–ˆλ˜ μ΄μŠˆλŠ” μ²˜λ¦¬ν•˜μ§€ λͺ»ν–ˆλ‹€. ν•΄κ²°ν• λ €κ³  ν•˜λ©΄ ν•˜κ² μ§€λ§Œ 그거에 νˆ¬μžν•˜λŠ” μ‹œκ°„μ΄ λ„ˆλ¬΄ κΈΈ 것 κ°™λ‹€. 차라리 swr을 ν†΅ν•΄μ„œ ssrλ₯Ό μ μš©ν•˜λŠ”κ²Œ 쒋은 것 κ°™λ‹€. 그리고 μ°ΎμœΌλ©΄μ„œ next.jsλ₯Ό 깊게 μ΄ν•΄λŠ” 글을 μ°Ύμ•˜λŠ”λ° λ‚˜μ€‘μ— ν•œλ²ˆ 봐야겠닀.

https://qiita.com/jagaapple/items/faf125e28f8c2860269c

EP.11 write νŽ˜μ΄μ§€μ—μ„œ 에디터 μ μš©ν•˜κΈ° (6) - swr을 μ΄μš©ν•΄μ„œ ssr 및 csr 적용.

swr을 μ΄μš©ν•΄μ„œ μž‘μ„± νŽ˜μ΄μ§€ μ„œλ²„ μ‚¬μ΄νŠΈ λ Œλ”λ§ 및 ν΄λΌμ΄μ–ΈνŠΈ μ‚¬μ΄λ“œ λ Œλ”λ§μ„ μ μš©ν–ˆλ‹€. μ²˜μŒμ— swrμ—μ„œ react-query 처럼 enabled μ˜΅μ…˜μ΄ μ—†μ–΄μ„œ μ–΄λ–»κ²Œ 해야할지 고민이 λ˜μ—ˆλŠ”λ°

const { data } = useSWR(
  slug ? `http://localhost:3000/api/posts/${slug}` : null,
  fetcher,
  {
    initialData: post,
  }
);

ν•΄λ‹Ή μ½”λ“œμ˜ null을 λ„˜κ²¨μ€˜μ„œ λ¬΄νš¨ν™” μ μš©μ„ ν–ˆλ‹€.

https://swr.vercel.app/docs/arguments

story-front's People

Contributors

ohminssup avatar dragonck avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.