reactnative-client
  • @dormakaba/digital-reactnative-client
  • Getting started
  • Changelog
  • Concerns
    • App State
    • Global / Local Snacks
    • Forms
    • Navigation
    • i18n
    • rest api
  • Utils
    • formatters
    • EventEmitter
    • Logger
    • settings
    • validate
    • misc
Powered by GitBook
On this page
  1. Utils

misc

Misc stuff.

compose

import { compose } from '@dormakaba/digital-reactnative-client';

// use it to wrap a component with multiple higher order components
export default compose(
  translate('common'),
  form({
    validate: validate({
      firstname: 'required',
    }),
    onSubmit: values => {
      console.warn(values);
    },
  })
)(myComponent);

debounce

import { debounce } from '@dormakaba/digital-reactnative-client';

const myDebouncedFunction = debounce(myFunction, timeInMS);

uuid

import { uuid } from '@dormakaba/digital-reactnative-client';

uuid.v4(); // returns a new uuid 
Previousvalidate

Last updated 6 years ago