Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Latest commit

 

History

History
33 lines (23 loc) · 709 Bytes

appendix.md

File metadata and controls

33 lines (23 loc) · 709 Bytes

코드 스플리팅으로 bundle.js 크기 줄이기

class AsyncLoginPage extends PureComponent {
  componentDidMount() {
    import("./LoginPage").then(({ default: Component }) => {
      this.Component = Component;
      this.forceUpdate();
    });
  }

  render() {
    const Component = this.Component;
    return Component ? <Component {...this.props} /> : null;
  }
}

지연 로딩으로 구현하기

  • 해당 컴포넌트에 접근하기 전까지 컴포넌트를 임포트하지 않으므로 줄일 수 있다.

Firebase

SSR 도입하기

  • next.js

SSR 로 구동되는 서비스 배포하기

  • netlify, S3