useAppClient
import { useAppClient } from '@akinon/app-client';
const MyComponent = () => {
const { data, navigate, showToast } = useAppClient();
return (
<div>
<p>User: {data?.user?.name}</p>
<button onClick={() => navigate({ path: '/home' })}>Home</button>
<button onClick={() => showToast('Hello!', 'success')}>Greet</button>
</div>
);
};Return Value
Property
Type
Description
Accessing Shared Data
Navigation
Invoking Custom Actions
Default Actions
showToast
showConfirmationDialog
showErrorMessage
showRichModal
URL Search Params
Plugin Parameters
Modal Context
Locale Handling
Best Practices
1. Handle Loading State
2. Optional Chaining for Data
3. Error Handling for Actions
Next Steps
Last updated
Was this helpful?

