JSPM

@atia/raf

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

A package for handling react-admin APIS with firebase

Package Exports

  • @atia/raf
  • @atia/raf/lib/cjs/index.js
  • @atia/raf/lib/esm/index.js

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 (@atia/raf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@atia/raf

A basic implementation for react-admin data and auth provider using latest versions

Installation

Use the npm, yarn or pnpm to install @atia/raf.

npm i @atia/raf yarn add @atia/raf pnpm add @atia/raf

Usage

import { Admin } from "react-admin";
import { configureApp } from "@atia/raf";

const appConfig = {
  apiKey: API_KEY,
  authDomain: AUTH_DOMAIN,
  databaseURL: DATABASE_URL,
  projectId: PROJECT_ID,
  storageBucket: STORAGE_BUCKET,
  messagingSenderId: MESSAGING_SENDER_ID,
  appId: APP_ID,
};

// pass configs and optional options object as second paramater
// used for changing some default behaviours
const { getAuthProvider, getDataProvider } = configureApp(appConfig);

// pass empty object for default react admin methods
// or you can override the default
const dataProvider = getDataProvider({});
const authProvider = getAuthProvider({});

<Admin
  dataProvider={dataProvider}
  authProvider={authProvider}
  // ...
>
  // resources go here...
</Admin>;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GitHub