我正在阅读MobX 文档,但对以下代码感到困惑:
class Todo {
id = Math.random();
@observable title = "";
@observable finished = false;
}
@observer
class TodoListView extends Component {
render() {
return <div>
<ul>
{this.props.todoList.todos.map(todo =>
<TodoView todo={todo} key={todo.id} />
)}
</ul>
Tasks left: {this.props.todoList.unfinishedTodoCount}
</div>
}
}
@符号的意义是什么?