nymus

Transform ICU message format into React components

Put in ICU formatted messages
{
"Message": "Hi {name}, your score is {score, number, percent}.",
"CurrentDate": "It's {now, time, short}.",
"Basket": "I have {eggs, plural, one {one egg} other {# eggs}}.",
"Progress": "Your score went {direction, select, up {up} other {down}}.",
"Navigate": "Go to our <Link>about page</Link>."
}
Get out React components
<Message name="johnny" score={0.75} />
<CurrentDate now={new Date()} />
<Basket eggs={12} />
<Progress direction='up' />
<Navigate Link={props => <a href='/about'>{props.children}</a>} />