MCPcopy
hub / github.com/redux-zero/redux-zero / connect

Function connect

src/react/components/connect.tsx:57–73  ·  view source on GitHub ↗
(
  mapToProps?: mapToProps<S>,
  actions = {}
)

Source from the content-addressed store, hash-verified

55}
56
57export default function connect<S = any, P = any>(
58 mapToProps?: mapToProps<S>,
59 actions = {}
60) {
61 return (Child: any) =>
62 class ConnectWrapper extends React.Component<P> {
63 render() {
64 const { props } = this;
65
66 return (
67 <Connect {...props} mapToProps={mapToProps} actions={actions}>
68 {(mappedProps: object) => <Child {...mappedProps} {...props} />}
69 </Connect>
70 );
71 }
72 };
73}

Callers 10

Counter.jsFile · 0.90
Counter.jsFile · 0.90
page.jsFile · 0.90
page.jsFile · 0.90
Counter.jsFile · 0.90
App.jsFile · 0.90
Route1.jsFile · 0.90
Route2.jsFile · 0.90
Counter.jsFile · 0.90
connect.spec.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected