# Property assignment expected. ts(1136)

**URL:** <https://forum.kirupa.com/t/property-assignment-expected-ts-1136/644582>\
**Category:** web dev\
**Created:** [October 17, 2020, 2:59am UTC](https://forum.kirupa.com/t/property-assignment-expected-ts-1136/644582 "2020-10-17T02:59:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangpjy](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wangpjy](https://forum.kirupa.com/u/wangpjy)\
**Post date:** [October 17, 2020, 2:59am UTC](https://forum.kirupa.com/t/property-assignment-expected-ts-1136/644582/1 "2020-10-17T02:59:40Z")

</div>

I am following book Learning React, chapter 13 page 158, to  
first create-react-app helloworld and create HelloWorld.js

```javascript
import React, {Component} from "react";
class HelloWorld extends Component{
  render() {
    return {
      <div className="helloContainer">
      <h1> Hello World </h1>
      </div>
    };
  }
}
export default HelloWorld;

```

error message:  
at \<div , I got “Property assignment expected.ts(1136)”  
at className, I got 2 errors  
Unreachable code detected.ts(7027)  
‘;’ expected.ts(1005)

package.json  
{  
“name”: “helloworld”,  
“version”: “0.1.0”,  
“private”: true,  
“dependencies”: {  
“@testing-library/jest-dom”: “^4.2.4”,  
“@testing-library/react”: “^9.5.0”,  
“@testing-library/user-event”: “^7.2.1”,  
“react”: “^16.14.0”,  
“react-dom”: “^16.14.0”,  
“react-scripts”: “3.4.3”  
},  
“scripts”: {  
“start”: “react-scripts start”,  
“build”: “react-scripts build”,  
“test”: “react-scripts test”,  
“eject”: “react-scripts eject”  
},  
“eslintConfig”: {  
“extends”: “react-app”  
},  
“browserslist”: {  
“production”: [  
“\>0.2%”,  
“not dead”,  
“not op\_mini all”  
],  
“development”: [  
“last 1 chrome version”,  
“last 1 firefox version”,  
“last 1 safari version”  
]  
}  
}

I am using  
visual studio code Version: 1.50.0  
Commit: 93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3  
Date: 2020-10-07T06:01:33.073Z  
Electron: 9.2.1  
Chrome: 83.0.4103.122  
Node.js: 12.14.1  
V8: 8.3.110.13-electron.0  
OS: Linux x64 5.4.0-51-generic

Can you help? Thanks!

---

<div class="post-metadata">

**Author:** ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)\
**Post date:** [October 17, 2020, 9:25am UTC](https://forum.kirupa.com/t/property-assignment-expected-ts-1136/644582/2 "2020-10-17T09:25:41Z")

</div>

Hi. Your jsx (html) should be wrapped by parens (`()`) or nothing at all, not curly braces (`{}`). I think that’s what is causing the error.

---

<div class="post-metadata">

**Author:** ![wangpjy](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@wangpjy](https://forum.kirupa.com/u/wangpjy)\
**Post date:** [October 18, 2020, 1:38am UTC](https://forum.kirupa.com/t/property-assignment-expected-ts-1136/644582/3 "2020-10-18T01:38:30Z")

</div>

Thanks a lot. That is it.
