@haykal/settings-client
v1.0.0
Published
Domain client package for the **Settings** domain.
Readme
@haykal/settings-client
Domain client package for the Settings domain.
Usage
import { useSettings } from '@haykal/settings-client';
function SettingsList() {
const { data, isLoading } = useSettings();
if (isLoading) return <div>Loading...</div>;
return (
<ul>
{data?.map((item) => (
<li key={item.id}>{item.name}</li>
))}
</ul>
);
}Generating the Client
Make sure the backend is running, then:
nx generate @haykal/settings-clientThis generates React Query hooks and TypeScript types from the OpenAPI spec.
