JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q33148F
  • License MIT

Moleculer.services data provider for react-admin

Package Exports

  • moleculer-ra-data-provider

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (moleculer-ra-data-provider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

moleculer-ra-data-provider

Build Status FOSSA Status

A Moleculer compatible data provider for React Admin.

Convert on-the-fly data exchanged with Moleculer micro-services in order to use them directly in your React-Admin components like List, Edit, Create ....

Features

Supported actions:

  • CREATE
  • GET_ONE
  • GET_LIST
  • GET_MANY
  • GET_MANY_REFERENCE
  • UPDATE
  • UPDATE_MANY
  • DELETE
  • DELETE_MANY

Installation

# via npm
npm install moleculer-ra-data-provider

# OR via yarn
yarn add moleculer-ra-data-provider

Usage

Import this package, set the base url and pass it as the dataProvider to react-admin.

//in app.js
import React from "react";
import { Admin, Resource } from "react-admin";
import { ListGuesser } from 'react-admin'; // example

import moleculerDataProvider from 'moleculer-ra-data-provider';

const dataProvider = moleculerDataProvider('http://localhost:3000/api');

const App = () => (
  <Admin dashboard={Dashboard} dataProvider={dataProvider}>
    // example displaying a list received from http://localhost:3000/api/myusers 
    <Resource name="myusers"    list={ListGuesser} />
  </Admin>
);

export default App;

Licence

MIT

FOSSA Status