codevise/pageflow

View on GitHub
entry_types/paged/packages/pageflow-paged-react/src/collections/itemScopeHelpers.js

Summary

Maintainability
A
0 mins
Test Coverage
export function addItemScope(state, collectionName, itemId) {
  return {
    ...state,
    [getItemScopeProperty(collectionName)]: itemId
  };
}

export function getItemScopeProperty(collectionName) {
  return `__${collectionName}_connectedId`;
}