childEntitySelector

childEntitySelector is a function which creates a predefined relationship selector factory. Its goal is to simply the process of creating relationship selectors with childEntity.

declare function childEntitySelector(
entityStateSelector,
keyId,
keyValue,
);

Its parameters are the same as childEntity has, but without relationships.

const address = rootEntitySelector(
selectAddressState,
);
const addressCompany = childEntitySelector(
selectCompanyState,
'addressId',
'company',
);
// later.
const address1 = address(
addressCompany(),
);
// the same as.
const address2 = rootEntity(
selectAddressState,
childEntity(
selectCompanyState,
'addressId',
'company',
),
);
Last updated on by MG