Skip to content

Helpers to create domain-driven design (DDD) inspired action strings for Redux

License

Notifications You must be signed in to change notification settings

teamleadercrm/ddd-action-string

Repository files navigation

@teamleader/ddd-action-string npm version

Helpers to create domain-driven design (DDD) inspired action strings for Redux

Installation

NPM

npm i @teamleader/ddd-action-string

Yarn

yarn add @teamleader/ddd-action-string

Usage Example

import {
  createApplicationActionString,
  createDomainActionString,
  createRequestActionStrings,
} from '@teamleader/ddd-action-string';

createApplicationActionString({
  organisation: 'teamleader',
  application: 'calendar',
  domain: 'routing/calendars',
  action: 'goto_today',
});

// 'Teamleader/Calendar/Application/Routing/Calendars/GOTO_TODAY'

createDomainActionString({
  organisation: 'teamleader',
  domain: 'events',
  action: 'initialize',
});

// 'Teamleader/Domain/Events/INITIALIZE'

createRequestActionStrings({
  organisation: 'teamleader',
  domain: 'events',
  action: 'list',
});

/*
  [
    'Teamleader/Domain/Events/LIST_REQUEST',
    'Teamleader/Domain/Events/LIST_SUCCESS',
    'Teamleader/Domain/Events/LIST_FAILURE'
  ]
*/

MIT

About

Helpers to create domain-driven design (DDD) inspired action strings for Redux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published