Perseus
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Properties

    _isMounted: boolean
    changeJSON: (newJson: PerseusItem) => void = ...
    hintsEditor: RefObject<CombinedHintsEditor> = ...
    itemEditor: RefObject<ItemEditor> = ...
    toggleJsonMode: () => void = ...
    defaultProps: DefaultProps = ...

    Methods

    • Called immediately after updating occurs. Not called for the initial render.

      The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

      Parameters

      Returns void

    • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

      Returns void

    • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

      Note: the presence of this method prevents any of the deprecated lifecycle events from running.

      Parameters

      Returns
          | {
              answerArea?: PerseusAnswerArea;
              hints: Hint[]
              | undefined;
              question?: PerseusRenderer;
          }
          | null

    • Updates JSON state when props change from the parent.

      state.json is initialized once in the constructor. If the Frontend sends fresh data while the editor is already mounted, we need to update state.json to reflect those changes.

      Returns void