Created
March 8, 2019 03:30
-
-
Save mr21/05a57dc90a39b0844715435ac1df2493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the new TodoMVC instance: | |
// ................................................................ | |
const todomvc2 = new TodoMVC(); | |
document.body.append( todomvc2.rootElement ); | |
// move the first todo from the first todomvc to the second one | |
// ................................................................ | |
const firstTodoId = Object.keys( todomvc.data )[ 0 ], | |
firstTodo = todomvc.data[ firstTodoId ]; | |
delete todomvc.data[ firstTodoId ]; | |
todomvc2.data[ firstTodoId ] = firstTodo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment