PsyTask | API Docs
    Preparing search index...

    Function getCurrentScene

    • 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 '';
      };