PsyTask | API Docs
    Preparing search index...

    Variable getCurrentSceneConst

    getCurrentScene: () => Scene<MaybeGenericComponent<any, {}>>

    Type Declaration

      • (): Scene<MaybeGenericComponent<any, {}>>
      • Returns Scene<MaybeGenericComponent<any, {}>>

    Must be called on the top scope of component

    const Component = (props: {}) => {
    const ctx = getCurrentScene();
    return '';
    };

    DO NOT call on other place

    const Component = (props: {}) => {
    const fn = () => {
    const ctx = getCurrentScene(); // WRONG!
    };
    return '';
    };