PowerHorse Engine
    Preparing search index...

    Variable createSuspenseConst

    createSuspense: (
        Content: (props?: unknown, children?: unknown) => Instance,
        Loading?: (props?: unknown, children?: unknown) => Instance,
        Err?: (props?: unknown, children?: unknown) => Instance,
    ) => SwitchStatementReturn<Instance> = createSuspenseInternal

    Type Declaration

      • (
            Content: (props?: unknown, children?: unknown) => Instance,
            Loading?: (props?: unknown, children?: unknown) => Instance,
            Err?: (props?: unknown, children?: unknown) => Instance,
        ): SwitchStatementReturn<Instance>
      • Will call the Content function inside a Promise, Note that the Content function is not wrapped in a createElement(). It is called directly inside the Promise.

        This allows you to have yielding code inside of an element

        e.g.

        return <> {() => task.wait(1); return } </>

        Parameters

        • Content: (props?: unknown, children?: unknown) => Instance
        • OptionalLoading: (props?: unknown, children?: unknown) => Instance
        • OptionalErr: (props?: unknown, children?: unknown) => Instance

        Returns SwitchStatementReturn<Instance>