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 eight areas:

  1. HTTP client and request lifecycle
  2. API client combining HTTP and React Query
  3. React Query integration
  4. Server-Sent Events (SSE)
  5. State management (Zustand stores and Jotai atoms)
  6. State machines (XState)
  7. Context providers
  8. Re-exports of motion, DnD, and Immer

Suggested Reading Order

  1. HTTP and API Client
  2. Query and Mutation
  3. Store and Atom
  4. Context Providers
  5. SSE, Motion, DnD, and Immer

Quick Reference

NeedExport
Make HTTP requestsHttpClient, createHttpClient
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
SSE streamingSseClient, createSseClient
Permission checkcheckPermission
Immer mutationproduce, useImmer