3box-react-hooks
Version:
React hooks wrapping the 3box API
12 lines (8 loc) • 302 B
JavaScript
import { getProfile, getSpace } from '3box/lib/api';
import { useAsync } from './helperHooks';
export const useProfile = (...args) => {
return useAsync(() => getProfile(...args), [...args]);
};
export const usePublicSpace = (...args) => {
return useAsync(() => getSpace(...args), [...args]);
};