Function ProxyDiProvider

Provides a ProxyDi container to its child components. If a container is not provided (the recommended usage), a new container will be created. If this provider is nested within another ProxyDiProvider, the newly created container will be a child of the container from the parent ProxyDiProvider.

  • Parameters

    • props: ProxyDiProviderProps
      • init

        Function to initialize the container's dependencies. This is the recommended way to register dependencies in the container.

      • container

        An alternative, though not recommended, way to provide an initialized container instance.

      • children

        Child components that will have access to the container.

    Returns ReactNode | Promise<ReactNode>

Properties

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.

displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'