JSPM

@ricardojrmcom/echo

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9950F
  • License MIT

React lightweight intl

Package Exports

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

Readme

@ricardojrmcom/echo

React lightweight intl

build license

author

lang version size




Install

npm install @ricardojrmcom/echo

yarn add @ricardojrmcom/echo

Usage

// component
import { Echo, EchoProps } from '@ricardojrmcom/echo';

// hook
import { useEcho, EchoRecord, EchoMsgs } from '@ricardojrmcom/echo';

// provider
import { EchoProvider, EchoProviderProps } from '@ricardojrmcom/echo';


// app
const exampleEcho: EchoRecord = {
  en: {
    example: 'example en',
  },
  pt: {
    example: 'exemplo pt',
  },
};

<EchoProvider echo={exampleEcho} echoDefault="en">
  {...}
</EchoProvider>


// component
const Echo = ({ echoid }: EchoProps) => {
  const { echo } = useEcho();
  return <span>{echo(echoid)}</span>;
};

<Echo echoid="example" />



License

MIT © Ricardo <l1b3r_-> Mota (@ricardojrmcom)

Bootstrapped with 🟣@ricardojrmcom/supernova