Created
February 17, 2019 00:35
-
-
Save malerba118/227195192ed374a2780e81c3178412cd to your computer and use it in GitHub Desktop.
Other Queries
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
const queries = { | |
getTodoById: (id) => { | |
return { | |
schema: TodoSchema, | |
value: id | |
}; | |
} | |
}; | |
const TodoDetailComponent = (props) => { | |
let db = useDB(); | |
let query = queries.getTodoById(props.todoId); | |
let todos = db.executeQuery(query); | |
return ( | |
<JSON data={todos} /> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment