Closed ecumene closed 3 years ago
const {data, loading, error} = useAPI(`/projects/${id}`) // Returns an object
const makeNewProject = usePostAPI('/projects/'); // Returns a function makeNewProject({ name: 'Hello world' });
useAPI working for fetching username, and usePostAPI works for posting to projects. usePostAPI was a bit confusing, but I get the idea now. once implemented with post walls, I should have a better grasp.