@amplicode/react
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Amplicode React

Amplicode frontend utils, which are used in generated Amplicode app. Components are extracted in library to avoid code duplication. In case of separate npm package, the same components could be used both in generated app and in addon.

This package installed by default in generated app, so components available in app immediately, without preliminary steps.

In other cases npm command should be used:

npm install @amplicode/react

Apollo Client

Provides ability to work with backend over GraphQL protocol. Advanced configuration for apollo client described below.

Locale Link

React Admin I18N Provider could be passed as argument in client. In this case server gets the opportunity to return translated error messages.

Http Link

Http link preconfigure options, such as uri and credentials.

Auth Link

Noop implementation by default. Used, when other types of authentication applied.

Usage of Amplicode Apollo Client

If package is installed to app, client could be used as:

import { createAmplicodeApolloClient } from "@amplicode/react";
import { ApolloClient, NormalizedCacheObject } from "@apollo/client";

export const apolloClient: ApolloClient<NormalizedCacheObject> = createAmplicodeApolloClient({});

Readme

Keywords

none

Package Sidebar

Install

npm i @amplicode/react

Weekly Downloads

3

Version

1.0.2

License

Apache-2.0

Unpacked Size

9.43 kB

Total Files

9

Last publish

Collaborators

  • amplicode-team
  • cuba-platform