# Kirupa React book \> Chapter 15 \> Don't see the result.

**URL:** https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774
**Category:** Uncategorized
**Created:** [October 6, 2018, 10:33am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774 "2018-10-06T10:33:34Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 6, 2018, 10:33am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/1 "2018-10-06T10:33:34Z")

</div>

Hey,  
I have purchased the React Book. In the chapter 15, I have set up my environment with success… But I don’t see the result in my index.html page

Hello, Batman…  
… etc

Any idea will be appreciated !

Thanks!

neuhaus3000

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 6, 2018, 8:10pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/2 "2018-10-06T20:10:16Z")

</div>

Help us help you by maybe sharing what the console is saying when you are trying to open index.html? You can access the console from the browser developer tools by right clicking on the page. 😊

---

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 6, 2018, 8:26pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/3 "2018-10-06T20:26:56Z")

</div>

Hey Millad!  
Here’s my console error:  
Uncaught TypeError: o.a.createClass is not a function  
at Module. (myCode.js:6)  
at n (myCode.js:1)  
at myCode.js:1  
at myCode.js:1

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 6, 2018, 8:34pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/4 "2018-10-06T20:34:19Z")

</div>

This is surely a version problem, If you are starting fresh, I would suggest you to create a `React component` by extending `React.Component` rather than using `React.createClass` since its deprecated from version `16.0` onwards and has been moved to a separate package `'create-react-class'`

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 6, 2018, 8:35pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/5 "2018-10-06T20:35:01Z")

</div>

```
import React from 'react';

export default class App extends React.Component {
    render(){
       return(
           <div>
               <h1> the list </h1>
           </div>   
        )
     }
}
```

---

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 6, 2018, 8:58pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/6 "2018-10-06T20:58:52Z")

</div>

Same error after modifying… ☹

```
import React from "react";
import ReactDOM from "react-dom";

var HelloWorld = export default class App extends React.Component({
    render: function() {
	    return (
		    <p>Hello, {this.props.greetTarget}!</p>
	    );
    }
});

ReactDOM.render(
    <div>
	    <HelloWorld greetTarget="Batman"/>
	    <HelloWorld greetTarget="Iron Man"/>
	    <HelloWorld greetTarget="Nicolas Cage"/>
	    <HelloWorld greetTarget="Mega Man"/>
	    <HelloWorld greetTarget="Bono"/>
	    <HelloWorld greetTarget="Catwoman"/>
    </div>,
    document.querySelector("#container")
);
```

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 6, 2018, 9:17pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/7 "2018-10-06T21:17:30Z")

</div>

I think this  
`var HelloWorld = export default class App extends React.Component({`

Should be

`var HelloWorld = React.Component({`

---

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 7, 2018, 4:11am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/8 "2018-10-07T04:11:46Z")

</div>

Modified without success… ☹

---

<div class="post-metadata">

### Author: ![Wayne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wayne/32/16501_2.png) [@Wayne](https://forum.kirupa.com/u/Wayne)
#### Post date: [October 7, 2018, 7:33am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/9 "2018-10-07T07:33:34Z")

</div>

What error are you getting now? Same?

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [October 7, 2018, 8:33am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/10 "2018-10-07T08:33:23Z")

</div>

Can you please zip up and attach your full project / file? There is something minor going on that we all are missing (aka the joys of programming) 🙃

---

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 7, 2018, 2:36pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/11 "2018-10-07T14:36:00Z")

</div>

There it is without the node modules (too big).

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [October 7, 2018, 11:42pm UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/12 "2018-10-07T23:42:31Z")

</div>

Thanks for sharing the project. The reason for the error is due to a version mismatch between what versions of React support `createClass` and which ones don’t. When you mentioned you bought the React book, it seems like you purchased last year’s edition which has some breaking changes compared to what React provides today 🙂

To fix your code, @Wayne was on the right track. Replace the contents of **index.jsx** with the following:

```
import React from "react";
import ReactDOM from "react-dom";
 

export default class HelloWorld extends React.Component {
	render(){
		 return(
			<p>Hello, {this.props.greetTarget}!</p>
			)
	 }
}
 
ReactDOM.render(
  <div>
    <HelloWorld greetTarget="Batman"/>
    <HelloWorld greetTarget="Iron Man"/>
    <HelloWorld greetTarget="Nicolas Cage"/>
    <HelloWorld greetTarget="Mega Man"/>
    <HelloWorld greetTarget="Bono"/>
    <HelloWorld greetTarget="Catwoman"/>
  </div>,
  document.querySelector("#container")
); 

```

This should ensure your app works fine. The way to build your React apps today via the command line is to use something like create-react-app. I wrote about how to do that here: [https://www.kirupa.com/react/setting\_up\_react\_environment.htm](https://www.kirupa.com/react/setting_up_react_environment.htm)

Getting back to the version mismatch issues, the recommended way to build your React components is to use the `class` syntax. That is a minor transfer of knowledge from what you already learned with `createClass`. My revised [Components tutorial](https://www.kirupa.com/react/components.htm) will help you make that jump.

Let me know if that helps 🙂

Cheers,  
Kirupa

---

<div class="post-metadata">

### Author: ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)
#### Post date: [October 8, 2018, 12:23am UTC](https://forum.kirupa.com/t/kirupa-react-book-chapter-15-dont-see-the-result/638774/13 "2018-10-08T00:23:38Z")

</div>

Hey Kirupa,

Yes, I did the trick ! I’ll follow the instructions from the website from now on.

Thanks a lot !  
neuhaus3000
