# remult-react-admin

> an extension package for react admin that leverages remult metadata

Latest version **0.9.10** (published 2021-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install remult-react-admin
pnpm add remult-react-admin
yarn add remult-react-admin
bun add remult-react-admin
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.10 |
| Published | 2021-11-24 |
| First published | 2021-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 59.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | noamhonig |

## Links

- npm: https://www.npmjs.com/package/remult-react-admin
- Repository: https://github.com/noam-honig/remult-react-admin
- Homepage: https://github.com/noam-honig/remult-react-admin#readme
- Issues: https://github.com/noam-honig/remult-react-admin/issues
- npm.io page: https://npm.io/package/remult-react-admin

## Recent versions

- 0.9.10 (latest) — 2021-11-24
- 0.9.7 — 2021-11-24
- 0.9.6 — 2021-11-24
- 0.9.5 — 2021-11-24

## README

# remult-react-admin

remult-react-admin is a library that facilitates the use of `react-admin` by leveraging `remult`'s entities metadata.

## Install react admin
```sh
npm i react-admin remult-react-admin
```

## Usage
```ts
import { Admin } from "react-admin";
import { raBuilder, RemultReactAdminDataProvider } from "remult-react-admin";
import { remult } from "./common";
import { Task } from './Task';

const taskRepo = remult.repo(Task);
const dataProvider = new RemultReactAdminDataProvider(taskRepo);

function App() {

  return (
    <Admin dataProvider={dataProvider}>
      {new raBuilder(taskRepo).buildResource()}

    </Admin>
  );
}

export default App;
```

For more info, see [react-admin](https://marmelab.com/react-admin/)

## Reference
### RemultReactAdminDataProvider class, 
implements the `react-admin` dataProvider interface. 
You can send it one or more repositories, that will be used as the data source for `react-admin`

### raBuilder class
serves as a builder for react admin components
#### Members
* buildResource - builds a complete resources component with list, edit etc...
* buildEdit - builds a edit component
* buildCreate - builds a create component
* buildFilter - builds a filter component
* controls - a map, that maps between a `FieldMetadata` to it's matching control info, based on it's data type

---
_Source: https://npm.io/package/remult-react-admin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
