Skip to content

Instantly share code, notes, and snippets.

@malerba118
Created February 17, 2019 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malerba118/227195192ed374a2780e81c3178412cd to your computer and use it in GitHub Desktop.
Save malerba118/227195192ed374a2780e81c3178412cd to your computer and use it in GitHub Desktop.
Other Queries
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