MCPcopy
hub / github.com/reduxjs/react-redux / createInvalidArgFactory

Function createInvalidArgFactory

src/connect/invalidArgFactory.ts:3–14  ·  view source on GitHub ↗
(arg: unknown, name: string)

Source from the content-addressed store, hash-verified

1import type { Action, Dispatch } from 'redux'
2
3export function createInvalidArgFactory(arg: unknown, name: string) {
4 return (
5 dispatch: Dispatch<Action<string>>,
6 options: { readonly wrappedComponentName: string },
7 ) => {
8 throw new Error(
9 `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${
10 options.wrappedComponentName
11 }.`,
12 )
13 }
14}

Callers 3

mergePropsFactoryFunction · 0.90
mapStateToPropsFactoryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…