Registry / devops / ra-core

ra-core

JSON →
library5.14.7jsnpmunverified

Core components for react-admin, a frontend framework for building admin applications on top of REST/GraphQL services using React. Version 5.14.7 is the latest stable release. It provides data providers, auth providers, routing, and hooks, shipping TypeScript types. Released irregularly alongside react-admin; peer dependencies include React 18/19, react-router 6 or 7, react-hook-form, and @tanstack/react-query. Differentiates by providing a declarative, resource-based approach to building admin UIs with built-in CRUD, authentication, and internationalization.

npm install ra-core
INSTALL
IMPORT
SIG · RA-CORE
R
ra-core
devopsjavascriptv5.14.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Admin
import { Admin } from 'ra-core'
import Admin from 'ra-core'
Named export, not default. ESM and CJS both use named import.
Resource
import { Resource } from 'ra-core'
const Resource = require('ra-core').Resource
Correct for CJS, but many mistakenly use default import. Named export.
useGetList
import { useGetList } from 'ra-core'
import { useGetList } from 'react-admin'
useGetList is from ra-core, but react-admin re-exports it. Using react-admin is fine but ra-core is lighter.
DataProvider
import { DataProvider } from 'ra-core'
import DataProvider from 'ra-core'
Type export for defining data providers. Named export.

Demonstrates basic usage of Admin, Resource, and the useGetList hook to fetch data from a posts resource.

import { Admin, Resource, useGetList } from 'ra-core'; import { dataProvider } from './dataProvider'; const MyComponent = () => { const { data, total, isPending } = useGetList('posts', { pagination: { page: 1, perPage: 10 }, sort: { field: 'id', order: 'ASC' } }); return <div>Loaded {total} posts</div>; }; const App = () => ( <Admin dataProvider={dataProvider}> <Resource name="posts" list={MyComponent} /> </Admin> );
Debug
Known issues
breakingReact 17 support dropped; requires React 18 or 19
fix
Upgrade React to 18 or 19.
affects: >=5.0.0
breakingreact-router v5 support removed; peer deps now react-router v6 or v7
fix
Upgrade react-router to v6 or v7.
affects: >=4.0.0
breakinguseQuery and useMutation replaced by @tanstack/react-query hooks
fix
Replace usages with react-query hooks like useGetList.
affects: >=5.0.0
deprecateduseCheckAuth deprecated; use useAuthenticated instead
fix
Replace useCheckAuth with useAuthenticated.
affects: >=5.0.0
breakingDataProvider interface changed: create and update now require resource and params only
fix
Update custom data providers to match new signature.
affects: >=4.0.0
gotchaAdmin component requires a dataProvider prop
fix
Ensure dataProvider is defined and passed to <Admin>.
affects: >=4.0.0
Errors
Common errors & fixes
Cannot read properties of undefined (reading 'data')
useGetList might be called outside a Resource context.
fix
Wrap component inside <Resource> or use <Admin> context properly.
Error: No data provider found
Missing dataProvider prop on Admin component.
fix
Pass a valid dataProvider to <Admin> component.
TypeError: (0 , _raCore.useGetList) is not a function
Incorrect import; using default import instead of named import.
fix
Change import to: import { useGetList } from 'ra-core'.
Warning: React does not recognize the `resource` prop on a DOM element
Passing resource (string) directly to a DOM element instead of a component.
fix
Ensure resource is only passed to react-admin components like Resource or hooks.
Upgrade
Version history
5.14.7latest on npm
Audit
Dependencies
@tanstack/react-queryrequiredUsed for server state management and caching
reactrequiredCore React library requirement
react-domrequiredDOM rendering requirement
react-hook-formrequiredForm management
react-routerrequiredRouting library
react-router-domrequiredDOM bindings for routing
Agent activity
30 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
ra-core — npm install ra-core · libregistry