MCPcopy
hub / github.com/heroku/react-refetch / connectImpl

Function connectImpl

src/components/connect.js:22–38  ·  view source on GitHub ↗
(map, deprecatedOptionsArgument = {})

Source from the content-addressed store, hash-verified

20
21function connectFactory(defaults = {}, options = {}) {
22 function connectImpl(map, deprecatedOptionsArgument = {}) {
23 let finalOptions = options
24 if ('withRef' in deprecatedOptionsArgument) {
25 warning(false, 'The options argument is deprecated in favor of `connect.options()`. In a future release, support will be removed.')
26 finalOptions = Object.assign({}, options, { withRef: deprecatedOptionsArgument.withRef })
27 }
28
29 warning(!(Function.prototype.isPrototypeOf(defaults.buildRequest) &&
30 Function.prototype.isPrototypeOf(defaults.Request)),
31 'Both buildRequest and Request were provided in `connect.defaults()`. ' +
32 'However, this custom Request would only be used in the default buildRequest.'
33 )
34
35 warning(options.pure === undefined, '`pure` option is no longer supported')
36
37 return connect(map, defaults, finalOptions)
38 }
39
40 connectImpl.defaults = function (overrides = {}) {
41 checkTypes(overrides)

Callers

nothing calls this directly

Calls 1

connectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…