nymus
v0.2.0
Published
Transform ICU messages into React components.
Downloads
19
Maintainers
Readme
Transform ICU messages into React components.
Usage
Example
npx nymus ./messages.json
given a ./messages.json
file:
{
"Welcome": "It's {name}, {gender, select, male {his} female {her} other {their}} birthday is {birthday, date, long}"
}
nymus
will generate a module containing React components that can be readily imported in your project as follows:
import * as React from 'react';
import { Welcome } from './messages';
export function HomePage() {
return <Welcome name="John" gender="male" birthday={new Date(1985, 11, 3)} />;
}
Documentation
Author
👤 Jan Potoms
- Github: @janpot