Skip to content

Instantly share code, notes, and snippets.

@yiminghe
Last active December 17, 2021 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yiminghe/225787d5d54fbfe8751426fe0ac31221 to your computer and use it in GitHub Desktop.
Save yiminghe/225787d5d54fbfe8751426fe0ac31221 to your computer and use it in GitHub Desktop.
no-react-intl
const { createIntl,createIntlCache } = require('@yiminghe/no-react-intl');
const cache = createIntlCache()
const intl = createIntl({
locale: 'en',
messages: {
hello:'hello {name}'
}
}, cache);
console.log(intl.formatMessage({id:'hello'},{
name:'yiminghe'
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment