Skip to main content

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:

  1. HTTP client and request lifecycle
  2. API client combining HTTP and React Query
  3. Chunked, resumable file uploads (Storage / Uploader)
  4. React Query integration
  5. Server push channel (WebSocket)
  6. Server-Sent Events (SSE)
  7. State management (Zustand stores and Jotai atoms)
  8. State machines (XState)
  9. Context providers
  10. 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​

  1. HTTP and API Client
  2. Storage and Uploads
  3. Query and Mutation
  4. Store and Atom — Zustand stores, Jotai atoms, XState machines
  5. Context Providers
  6. Server Push
  7. SSE, Motion, DnD, and Immer

Quick Reference​

NeedExport
Make HTTP requestsHttpClient
Fetch/download authenticated filesHttpClient.requestFile, HttpClient.download
Chunked/resumable file uploadUploader, uploadFile
Create API clientcreateApiClient, ApiClient
Query datauseQuery, useInfiniteQuery
Mutate datauseMutation
Global storecreateStore, createPersistedStore
Component-scoped storecreateComponentStore
Atom stateatom, useAtom, useAtomValue, useSetAtom
State machinecreateMachine, useActor
App contextAppContextProvider, useAppContext
API client contextApiClientProvider, useApiClient
Server push messagesPushClient, createPushClient
SSE streamingSseClient, createSseClient
Permission checkcheckPermission
Immer mutationproduce, useImmer