---
title: Render State in the User Interface
localeTitle: 在用户界面中渲染状态
---
## 在用户界面中渲染状态
在挑战中,您需要在`
`标记中呈现状态值,非常简单。
## 暗示
只需创建一个``标记并在标记之间渲染`this.state.name` 。
## 解
```react.js
class MyComponent extends React.Component { 
  constructor(props) { 
    super(props); 
    this.state = { 
      name: 'freeCodeCamp' 
    } 
  } 
  render() { 
    return ( 
      
 
        { /* change code below this line */ } 
        
{this.state.name}
 
        { /* change code above this line */ } 
       
    ); 
  } 
 }; 
```