Skip to content

function useModule view code

useModule(
    root: Root, 
    module: ModuleScript
): Root

Requires a ModuleScript and adds the returned provider to the root, if any. If the provider is unnamed, the provider is named after the ModuleScript name.

Parameters

root: Root

The root that should use the ModuleScript.

module: ModuleScript

The ModuleScript that should be required.

Returns

Root

The same root for convenience.