1.0.6 • Published 6 months ago
@uxland/react-services v1.0.6
UXL React Services
Build Status | Statements | Branches | Functions | Lines |
---|---|---|---|---|
Installation
npm i @uxland/react-services
Usage
Get Hook
getHook('hookName', {foo: 'bar'});
Notification Service
const service = new NotificationService();
service.notify('foo', {position: 'bottom-right'});
service.notifyError('foo', {position: 'bottom-right'});
I18N
Setup i18n
setupI18n({foo: 'bar'}, 'es', '-');
Translation Service
const service = new TranslationService();
service.translate('foo');
Add locale bundle
addLocaleBundle("ca", "ns", {foo: {bar: "dummy"}});
Global path hook
const globalPath = useGlobalPath();
globalPath("ns.foo.bar") // => dummy
Locale path hook
const localePath = useLocalePath("ns");
localePath("foo.bar") // => dummy
Translate
translate('ns', 'foo.bar', {dummy: 0})
1.0.6
6 months ago
1.0.5
7 months ago
1.0.4
7 months ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
1.0.0-alpha.4
1 year ago
1.0.0-alpha.3
1 year ago
1.0.0-alpha.2
1 year ago
1.0.0-alpha.1
1 year ago