Skip to content

Instantly share code, notes, and snippets.

@tai2
Last active June 12, 2017 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai2/3f6bcfc1515667a4e2dfbdddf3859416 to your computer and use it in GitHub Desktop.
Save tai2/3f6bcfc1515667a4e2dfbdddf3859416 to your computer and use it in GitHub Desktop.
Rails5.1でReact Todo MVC

Rails5.1でReact Todo MVC

読者はwebpackerのREADMEを読んでないと仮定。

入れるもの

  • redux
  • flowtype
  • eslint
  • reducerのテスト
  • HMRサポート
  • ふつうのView
    • ふつうのviewからアセット参照(css,画像(アイコンでいいか))
  • Bootstrap
  • herokuデプロイ(12factor不要)
  • ソート(created_at, due_date)
  • フィルター(done)
  • todo削除
  • webpacker-react,react-rails,react_on_railsの比較表

入れないもの

  • Sprockets
  • アカウント・認証
  • Action Cable
  • GraphQL
  • todoのcontent更新(作成後編集不可)
  • i18n
  • SSR

モデル

todos

  • content:string
  • created_at:datetime
  • due_date:datetime
  • done:bool

ルート

  • /react/todos
  • /classic/todos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment