haspar.us

🇵🇱 Szybciej‑taniej

Jul 09, 2019 · Chop-Chop Office

Slides: Dropbox Paper in Polish

Outline

A 15 minutes presentation, where I claim that React is a better tool to build static websites than Pug, because components are superior to mixins and partials. I introduced CSS-in-JS to improve the productivity and basics of TypeScript to make teamwork silky smooth.

  • TypeScript
    • You have types in JavaScript, you just can’t write about them
    • Bugs aren’t fun. Especially if we didn’t estimate them
    • The stricter, the better
    • Introduction to syntax
  • React
    • Building with components is simpler than smart design patters with fancy acronyms (MCV, MVI, MVC, MVVM, MVP)
    • Components introduce a contract props -> element
      type FunctionComponent<P> = (
        props: P & { children?: ReactNode }
      ) => ReactElement | null;
  • CSS-in-JS
  • Live Coding of a website
    • SSG vs SSR
    • renderToStaticMarkup
    • renderToString
    • what is hydration?
    • reinventing the wheel for educational purposes
      • don’t do it at home, use Gatsby or react-snap