1.0.6 • Published 2 years 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") // => dummyLocale path hook
const localePath = useLocalePath("ns");
localePath("foo.bar") // => dummyTranslate
translate('ns', 'foo.bar', {dummy: 0})1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
1.0.0-alpha.4
3 years ago
1.0.0-alpha.3
3 years ago
1.0.0-alpha.2
3 years ago
1.0.0-alpha.1
3 years ago