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?

家計簿アプリを作る#24

Posted at

スクリーンショット 2025-03-29 084047.png
スクリーンショット 2025-03-29 084154.png
ヘッダーの下に、SideBarコンポーネントを加えて、インポートします。

スクリーンショット 2025-03-29 084238.png
これらは、親コンポーネントで定義されているので、エラーが出ています。
なので、親コンポーネントから、SideBarコンポーネントにプロップスとして渡していきます。

*プロップスとは?
コンポーネントにデータを渡すとき、そのデータを属性として指定することで、コンポーネントに対して必要な情報を送ることができます。
例えば、Card1コンポーネントに title と text 、Card2コンポーネントには number と onClick という自分で作った属性のようなものを使ってデータを渡しています。 これらの属性のようなものをReactではPropsと呼びます。

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?