MCPcopy
hub / github.com/swagger-api/swagger-ui / viewPlugin

Function viewPlugin

src/core/plugins/view/index.js:17–32  ·  view source on GitHub ↗
({getComponents, getStore, getSystem})

Source from the content-addressed store, hash-verified

15}
16
17const viewPlugin = ({getComponents, getStore, getSystem}) => {
18 // getComponent should be passed into makeMappedContainer, _already_ memoized... otherwise we have a big performance hit ( think, really big )
19 const memGetComponent = memoizeForGetComponent(getComponent(getSystem, getStore, getComponents))
20 const memMakeMappedContainer = memoizeForWithMappedContainer(withMappedContainer(getSystem, getStore, memGetComponent))
21
22 return {
23 rootInjects: {
24 getComponent: memGetComponent,
25 makeMappedContainer: memMakeMappedContainer,
26 render: render(getSystem, getStore, getComponent, getComponents),
27 },
28 fn: {
29 getDisplayName,
30 },
31 }
32}
33
34export default viewPlugin

Callers

nothing calls this directly

Calls 5

getComponentFunction · 0.90
withMappedContainerFunction · 0.90
renderFunction · 0.90
memoizeForGetComponentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…