Skip to content

Commit ff6b694

Browse files
committed
[Doc] Add links to ra-core
1 parent 116c69b commit ff6b694

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

docs/Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Although this drawback exists, we accept it because the use of composition in re
219219

220220
## Hooks
221221

222-
When you find that you cannot tweak a react-admin component using props, you can always turn to the lower-level API: hooks. In fact, the core of react-admin is a headless library called `ra-core`, which primarily consists of hooks. These hooks hide the framework's implementation details, allowing you to focus on your business logic. It's perfectly normal to use react-admin hooks in your own components if the default UI doesn't meet your specific requirements.
222+
When you find that you cannot tweak a react-admin component using props, you can always turn to the lower-level API: hooks. In fact, the core of react-admin is a headless library called [`ra-core`](https://marmelab.com/ra-core/), which primarily consists of hooks. These hooks hide the framework's implementation details, allowing you to focus on your business logic. It's perfectly normal to use react-admin hooks in your own components if the default UI doesn't meet your specific requirements.
223223

224224
For example, the `<DeleteButton>` button used in `pessimistic` mode renders a confirmation dialog when clicked and then calls the `dataProvider.delete()` method for the current record. If you want the same feature but with a different UI, you can use the `useDeleteWithConfirmController` hook:
225225

docs/Contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ import { useListController } from 'ra-core';
250250

251251
That's because the `react-admin` package simply re-exports components from internal packages. React-admin is a *distribution* of several packages, each dedicated to a specific feature. These packages can be found in [the `packages/` directory](https://github.com/marmelab/react-admin/tree/master/packages). Some of the more notable packages include:
252252

253-
* `ra-core`: The core react-admin logic, without any UI.
253+
* [`ra-core`](https://marmelab.com/ra-core/): The core react-admin logic, without any UI.
254254
* `ra-ui-materialui`: The Material UI skin for react-admin.
255255
* `ra-data-*`: Data providers for various data backends.
256256
* `ra-language-*`: Interface translations for various languages.

docs/Features.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,11 @@ And for mobile users, react-admin renders a different layout with larger margins
279279

280280
React-admin components use Material UI components by default, which lets you scaffold a page in no time. As Material UI supports [theming](#theming), you can easily customize the look and feel of your app. But in some cases, this is not enough, and you need to use another UI library.
281281

282-
You can change the UI library you use with react-admin to use [Ant Design](https://ant.design/), [Daisy UI](https://daisyui.com/), [Chakra UI](https://chakra-ui.com/), or even you own custom UI library. The **headless logic** behind react-admin components is agnostic of the UI library, and is exposed via `...Base` components and controller hooks.
283-
284-
For instance, [`shadcn-admin-kit`](https://github.com/marmelab/shadcn-admin-kit) is a react-admin distribution that replaces Material UI with [Shadcn UI](https://ui.shadcn.com/).
282+
Fortunately, react-admin is built on top of a **headless library** called [`ra-core`](https://marmelab.com/ra-core/), which contains hooks and `...Base` components that you can use with any UI library. For instance, [`shadcn-admin-kit`](https://github.com/marmelab/shadcn-admin-kit) is a react-admin distribution that replaces Material UI with [Shadcn UI](https://ui.shadcn.com/).
285283

286284
[![Shadcn admin kit](https://github.com/marmelab/shadcn-admin-kit/raw/main/public/shadcn-admin-kit.webp)](https://github.com/marmelab/shadcn-admin-kit)
287285

288-
`shadcn-admin-kit` follows the same syntax conventions as react-admin, so most of the react-admin documentation still applies. For example, the `<ProductEdit>` component looks like this:
286+
`shadcn-admin-kit` follows the same syntax conventions as react-admin, so most of the react-admin syntax still applies. For example, the `<ProductEdit>` component looks like this:
289287

290288
```tsx
291289
import {
@@ -313,7 +311,7 @@ export const ProductEdit = () => (
313311
);
314312
```
315313

316-
Here is another example: a List view built with [Ant Design](https://ant.design/):
314+
You can also build apps with `ra-core` and [Ant Design](https://ant.design/), [Daisy UI](https://daisyui.com/), [Chakra UI](https://chakra-ui.com/), or even you own custom UI library. For example, here is a List view built with [Ant Design](https://ant.design/):
317315

318316
![List view built with Ant Design](./img/list_ant_design.png)
319317

@@ -322,7 +320,7 @@ It leverages the `useListController` hook:
322320
{% raw %}
323321

324322
```jsx
325-
import { useListController } from 'react-admin';
323+
import { useListController } from 'ra-core';
326324
import { Card, Table, Button } from 'antd';
327325
import {
328326
CheckCircleOutlined,

0 commit comments

Comments
 (0)