@venizia/ardor-react
v0.1.1
Published
ARDOR React bindings - the application context, the injectable and logger hooks that read it, typed Redux hook factories, and the framework-agnostic UI hooks (debounce, autosave, confirm, clipboard, sizer, window dimensions). No react-admin.
Readme
@venizia/ardor-react
The React bindings of ARDOR: the application context, the hooks that resolve out of it, and the UI hooks. No react-admin.
bun add @venizia/ardor-react @venizia/ardor-kernel @venizia/ignis-inversionMost applications install @venizia/ardor instead,
which re-exports this package.
What is in it
| Area | Exports |
|---|---|
| Context | ApplicationContext, useApplicationContext, useApplicationLogger |
| Injection | useInjectable - resolve a binding by key or by class |
| Redux | createAppDispatch, createAppSelectors - factories that bind your RootState and AppDispatch |
| UI hooks | useDebounce, useAutosave, useConfirm, useBeforeUnload, useCopyToClipboard, useSizer, useWindowDimensions |
| Types | SyncFC, TUseInjectableKeys |
Typing your own binding keys
IUseInjectableKeysOverrides is declared here, so augment this package - an interface merges only
into the module that declares it, never through a re-export:
declare module '@venizia/ardor-react' {
interface IUseInjectableKeysOverrides {
'services.PricingService': unknown;
}
}License
MIT - see LICENSE.md.
