Skip to content

Commit

Permalink
Merge pull request #17 from microstates/upgrade-sandboxes
Browse files Browse the repository at this point in the history
Upgrade sandboxes
  • Loading branch information
taras committed Dec 12, 2018
2 parents f572707 + 8837fa5 commit 6fbc965
Show file tree
Hide file tree
Showing 6 changed files with 2,205 additions and 32 deletions.
10 changes: 5 additions & 5 deletions sandboxes/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"keywords": [],
"main": "src/index.js",
"dependencies": {
"@microstates/todomvc": "1.0.0-beta.0",
"classnames": "2.2.6",
"@microstates/todomvc": "0.12.0",
"classnames": "^2.2.6",
"microstates": "0.12.3",
"prop-types": "15.6.2",
"react": "16.6.3",
"react-dom": "16.6.3",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-scripts": "2.1.1"
},
"scripts": {
Expand Down
15 changes: 5 additions & 10 deletions sandboxes/react/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class App extends React.Component {
this.setState({ $ });
this.props.onChange(valueOf($));
})
}
};
render() {
let { $ } = this.state;
return (
Expand Down Expand Up @@ -71,9 +71,7 @@ export default class App extends React.Component {
<label onDoubleClick={todo.edit}>{todo.text.state}</label>
<button
className="destroy"
onClick={() =>
$.todos.filter(item => todo.state !== item.state)
}
onClick={() => $.todos.remove(todo)}
/>
</div>
)}
Expand All @@ -100,17 +98,14 @@ export default class App extends React.Component {
))}
</ul>
{$.hasCompleted && (
<button
className="clear-completed"
onClick={$.clearCompleted}
>
<button className="clear-completed" onClick={$.clearCompleted}>
Clear completed
</button>
)}
</footer>
)}
</section>
</div>
)
);
}
}
}
Loading

0 comments on commit 6fbc965

Please sign in to comment.