Skip to main content

Slot Component Rendering Errors

Problem description​

During page rendering in the lowcode engine, you may see an error about the Slot component—"Slot not found". In render mode, the Slot component should not be used.

Cause​

Lowcode engine rendering has two modes: design mode and render mode.

  • Design mode: The Slot component is introduced to support visual design of slots.
  • Render mode: The Slot component is not needed.

This issue usually occurs when a design-mode schema is used incorrectly in render mode.

Solution​

  1. Distinguish design mode and render mode: Use the argument to project.exportSchema(TransformStage.Save) to distinguish them.
    • TransformStage.Save represents the render-mode schema, which does not include Slot components.
    • [Default] TransformStage.Render represents the design-mode schema, which includes Slot components.
  2. Use the correct API and arguments: In render mode, use the correct schema and avoid referencing design-mode Slot components.
  3. Handle stale data: If stale data caused the issue, clear the data and drag components again to recover.

Notes​

  • Ensure design mode and render mode are distinguished correctly in code and configuration.
  • If the problem persists, check for stale data or misconfiguration and clean up accordingly.