react开发一个todo小程序demo
代码语言:html
所属分类:其他
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>BFW NEW PAGE</title> <script id="bfwone" data="dep=react.dev|react-dom.dev&err=0" type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/bfwone.js"></script> <script type="text/javascript"> bready(function() { class TodoApp extends React.Component { constructor(props) { super(props); this.state = { items: [], text: '' }; this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } render() { return React.createElement( "div", null, React.createElement( "h3", null, "TODO" ), React.createElement(TodoList, { items: this.state.items }), React.createElement( "form", { onSubmit: this.handleSubmit }, React.createElement( "label", { htmlFor: "new-todo" }, "What needs to be done?" ), React.createElement("input", { id: "new-todo", onCh.........完整代码请登录后点击上方下载按钮下载查看
网友评论0