Skip to content

Janpot/nymus

Repository files navigation

Version License: MIT nymus test status

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

About

Transform ICU messages into React components.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages