-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
C-ChoreIssues related to quality-of-life improvementsIssues related to quality-of-life improvements
Description
Description
The client app's API client is written by hand. Investigate what it would take to generate an API client from the routes defined the server app's routes.
Requirements/Expected Behavior
Generate an API client that is compatible with React Hooks. It should support the following use cases
Note: The API doesn't necessarily have to be consistent with the examples below.
Call directly from useEffect()
export function MyComponent() {
useEffect(() => {
makeTitanApiRequest(ListFileEntryTypes)
.then(/* do something */);
});
return (...);
}
Wrap as a React hook
const fetchUsers = useTitanApiClient(ListOrganizationUsersRequest,
{ orgId: props.organizationId });
Metadata
Metadata
Assignees
Labels
C-ChoreIssues related to quality-of-life improvementsIssues related to quality-of-life improvements