Core Package Overview
@vef-framework-react/core is the runtime foundation of the framework. It does not contain UI components, but provides the infrastructure that all other packages depend on.
It covers ten areas:
- HTTP client and request lifecycle
- API client combining HTTP and React Query
- Chunked, resumable file uploads (Storage / Uploader)
- React Query integration
- Server push channel (WebSocket)
- Server-Sent Events (SSE)
- State management (Zustand stores and Jotai atoms)
- State machines (XState)
- Context providers
- Re-exports of motion, DnD, and Immer
All of these areas are exported from the package root, including the state (Jotai) and state-machine (XState) modules — both are public API, documented on the Store and Atom page.
Suggested Reading Order
- HTTP and API Client
- Storage and Uploads
- Query and Mutation
- Store and Atom — Zustand stores, Jotai atoms, XState machines
- Context Providers
- Server Push
- SSE, Motion, DnD, and Immer
Quick Reference
| Need | Export |
|---|---|
| Make HTTP requests | HttpClient |
| Fetch/download authenticated files | HttpClient.requestFile, HttpClient.download |
| Chunked/resumable file upload | Uploader, uploadFile |
| Create API client | createApiClient, ApiClient |
| Query data | useQuery, useInfiniteQuery |
| Mutate data | useMutation |
| Global store | createStore, createPersistedStore |
| Component-scoped store | createComponentStore |
| Atom state | atom, useAtom, useAtomValue, useSetAtom |
| State machine | createMachine, useActor |
| App context | AppContextProvider, useAppContext |
| API client context | ApiClientProvider, useApiClient |
| Server push messages | PushClient, createPushClient |
| SSE streaming | SseClient, createSseClient |
| Permission check | checkPermission |
| Immer mutation | produce, useImmer |