ReactorProviderProps
Defined in: react/src/index.tsx:250
Props of ReactorProvider.
Properties
Section titled “Properties”client
Section titled “client”
readonlyclient: () =>Client
Defined in: react/src/index.tsx:267
Returns the client of this tree. Either it creates one, such as
() => createClient({ network: "ic", auth: () => new AuthClient() }), and
the provider owns that client and disposes it when it unmounts; or it
returns a client the app created before, at module scope, as
() => client, and the provider borrows it and never disposes it.
A factory, not a client, so that the provider decides when it runs: once
per mounted provider, never per render. Give it no work beyond creating or
returning the client (createClient does none until the client is used):
React may call it twice in development and keep one result.
Only the factory of the first render is used. A different function on a
later render does not rebuild the client; to replace it, remount the
provider by giving it another key.
Returns
Section titled “Returns”children
Section titled “children”
readonlychildren:ReactNode
Defined in: react/src/index.tsx:269