Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

14 rader
503 B

  1. import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps'
  2. export function whenMapStateToPropsIsFunction(mapStateToProps) {
  3. return typeof mapStateToProps === 'function'
  4. ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps')
  5. : undefined
  6. }
  7. export function whenMapStateToPropsIsMissing(mapStateToProps) {
  8. return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : undefined
  9. }
  10. export default [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]