Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import { createSelector } from 'reselect';
  2. import { checkIfValid } from './helpers/validation';
  3.  
  4. const getAnswerValue = (state, props) =>
  5. state.getIn([props.uid, 'answer']);
  6.  
  7. export const getValidatedAnswer = createSelector(
  8. getAnswerValue,
  9. (answer) => ({
  10. value: asnwer,
  11. isValid: checkIfValid(answer),
  12. });
  13. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement