How to use the react-intl-wrapper.defineMessages function in react-intl-wrapper

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>

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