@rest-hooks/legacy
v9.0.3
Published
Legacy features for Rest Hooks
Downloads
2,271
Readme
Rest Hooks legacy support.
shapeToEndpoint
import { shapeToEndpoint } from '@rest-hooks/legacy';
function MyComponent() {
const endpoint: any = useMemo(() => {
return shapeToEndpoint(fetchShape);
// we currently don't support shape changes
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const mydata = useSuspense(endpoint, params);
//...
}