Skip to content

Instantly share code, notes, and snippets.

@kimniche
Last active June 19, 2017 18:16
Show Gist options
  • Select an option

  • Save kimniche/d1bb4cdd71630f52297d970f7f1efa40 to your computer and use it in GitHub Desktop.

Select an option

Save kimniche/d1bb4cdd71630f52297d970f7f1efa40 to your computer and use it in GitHub Desktop.
// --- open questions --
// type systems? typescript, flow
// ex:
function add(left: number, right: number): number {
return left + right;
}
// typescript:
// - provides static typing through type annotations to enable type checking at compile time
// - compiler checks and removes annotations
// - extension WebStorm support, Atom and Sublime plugins available
// flow:
// - by Facebook, React was designed with Flow in mind
// - static type checker, not a compiler
// - type annotations if present can be easily removed by babel plugin for runtime
// - said to be less obtrusive than TypeScript, can be added gradually to projects per file
// http library? axios for promise-based client
// next.js vs create-react-app
// create-react-app
// - modern build setup with 0 config; power users can "eject" to customize default config/tools
// - comes with webpack, babel, linting, jest
// - intentionally limited feature set (no server rendering or CSS modules, hot reloading, ...)
// next.js:
// - automatic code-splitting, routing, hot code reloading, and universal server- and client-side rendering
// - file system as the router for your app; add routes as pages (pages/index.js) and navigate from one to another using next/link component
// - url query params passed into page components, can async fetch data as needed there with async `getInitialProps`
// - comes with babel, webpack, HMR with lazy compilation to speed up component tree rendering/dev, error reporting, code splitting
// --- breakdown --
// discrete pieces: validation lib, scaffolding/setup, ?
// blocked pieces: templates, auth, service data load, form validation, form POSTs, ?
// polish: tests, cross browser, ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment