0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

React + Rails初心者の歩み 〜問題集:初級編〜

Posted at

【初級編(開発できるレベルの初級者向け)】

目標:基礎的なCRUDやログイン処理を理解する。

React(Viteベース)

1. 簡単なカウンターアプリを作成してください。
数字を+1、−1できるボタンを設置。
2. フォームから名前を入力して表示するアプリを作成してください。
入力 → ボタン押下 → 入力した名前が下に表示される。
3. APIからデータを取得してリスト表示するコンポーネントを作ってください。
JSONPlaceholder(https://jsonplaceholder.typicode.com/posts)などから取得。
4. コンポーネント分割を練習してください。
リスト部分、入力フォーム部分を別ファイルに分ける。

Rails(APIモード)

1. Userモデルを作成して、email, password_digestを持たせてください。
bcryptを使ってパスワード暗号化。
2. SessionControllerを作成して、emailとpasswordでログインできるAPIを実装してください。
正しくログインできたらsession[:user_id]を設定。
3. Postモデルを作成して、タイトルと本文を保存できるAPIを作成してください。
posts#create, posts#index APIを作る。
4. 簡単なバリデーションを設定してください。
タイトルは必須、本文は必須ではない、など。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?