teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

エラーを追記しました。

2018/06/24 09:03

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -3,6 +3,14 @@
3
3
  コードは以下の通りになります。
4
4
  よろしくお願いします。
5
5
 
6
+ エラーが出ていたので書いておきます。
7
+
8
+ ```
9
+ index.js:2178 Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
10
+ in Color (at App.js:8)
11
+ in App (at index.js:7)
12
+ ```
13
+
6
14
  App.js
7
15
  ```
8
16
  import React, { Component } from 'react';

3

ミスがあったので訂正しました

2018/06/24 09:03

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -28,7 +28,7 @@
28
28
  render () {
29
29
  return (
30
30
 
31
- function Counter() {
31
+ function Color() {
32
32
  return <p>hello world!</p>;
33
33
  }
34
34
  );

2

ミスがあったので書き直しました

2018/06/24 08:50

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,7 @@
31
31
  function Counter() {
32
32
  return <p>hello world!</p>;
33
33
  }
34
- )
34
+ );
35
35
  }
36
36
  }
37
37
 

1

ごじ

2018/06/24 07:52

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- 画面にoHello Worldを表示させたいのですが、何も表示されません。
1
+ 画面にHello Worldを表示させたいのですが、何も表示されません。
2
2
 
3
3
  コードは以下の通りになります。
4
4
  よろしくお願いします。
@@ -29,7 +29,7 @@
29
29
  return (
30
30
 
31
31
  function Counter() {
32
- return <p>hello!</p>;
32
+ return <p>hello world!</p>;
33
33
  }
34
34
  )
35
35
  }