Skip to content

Instantly share code, notes, and snippets.

@davidgilbertson
Created April 5, 2020 23:34
Show Gist options
  • Save davidgilbertson/baec1d4030fb10153f334db72fa36208 to your computer and use it in GitHub Desktop.
Save davidgilbertson/baec1d4030fb10153f334db72fa36208 to your computer and use it in GitHub Desktop.
import { store } from 'react-recollect';
const loadTodos = async () => {
const userId = store.user.id;
store.todos = await fetch(`/api/todos/${userId}`).then((resp) => resp.json());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment