How to use react-intl-wrapper - 2 common examples

To help you get started, weโ€™ve selected a few react-intl-wrapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mimecuvalo / helloworld / client / error / 401.js View on Github external
import { createLock } from '../app/auth';
import { defineMessages, F, useIntl } from 'react-intl-wrapper';
import React from 'react';
import useStyles from './errorStyles';

const messages = defineMessages({
  personGesturingNo: { msg: 'person gesturing no' },
});

export default function Unauthorized() {
  const intl = useIntl();
  const emojiAriaLabel = intl.formatMessage(messages.personGesturingNo);
  const styles = useStyles();

  function handleLogin(evt) {
    evt.preventDefault();
    createLock().show();
  }

  return (
    <div>
      <span aria-label="{emojiAriaLabel}" role="img"></span></div>
github mimecuvalo / helloworld / client / error / 401.js View on Github external
export default function Unauthorized() {
  const intl = useIntl();
  const emojiAriaLabel = intl.formatMessage(messages.personGesturingNo);
  const styles = useStyles();

  function handleLogin(evt) {
    evt.preventDefault();
    createLock().show();
  }

  return (
    <div>
      <span aria-label="{emojiAriaLabel}" role="img">
        ๐Ÿ™…
      </span>
      <h1>
        401: 
      </h1></div>

react-intl-wrapper

A wrapper around react-intl made for ease of use.

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis