import { IAppState , IForm } from '../store/types' ; import { createSelector } from 'reselect' ; import { path } from 'ramda' ; export const formStateSelector = ( state ) => state . form ; export const createFormFieldSelector = < T > ( fieldPath ) => createSelector ( formStateSelector , ( form ) => path < T > ( fieldPath , form ) ) ; export const archivedCharactersSelector = createSelector ( formStateSelector , ( form ) => form . archived . character ) ;