Provides sub components with the GeneratorRegistry, which allow access to the registered generator functions. You can create your own provider if needed, but it will need to provide an implementation of the GeneratorsContext.
GeneratorRegistry
GeneratorsContext
<GeneratorsProvider registry={registry}> { ... }</GeneratorsProvider> Copy
<GeneratorsProvider registry={registry}> { ... }</GeneratorsProvider>
Components should use the useGenerator hook to access generator functions.
useGenerator
GeneratorsProvider props
Optional
Provides sub components with the
GeneratorRegistry
, which allow access to the registered generator functions. You can create your own provider if needed, but it will need to provide an implementation of theGeneratorsContext
.Example
Remarks
Components should use the
useGenerator
hook to access generator functions.See