Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

<Props /> only working after changes to file #893

@julians

Description

@julians

Bug Report

<Props of={MyComponent} /> doesn’t render anything until I change and save the component‘s file. While this is annoying locally, it breaks the static build.

Happens with a clean npm project with only docs installed.

index.mdx:

import Test from "./Test.js";
import { Props } from "docz";

# Yay

lorem ipsum huhuhu

<Test>yay</Test>

<Props of={Test} />

Test.js:

import React from "react";
import PropTypes from "prop-types";

const Test = ({ children, className }) => {
  return <p className={className}>1 {children} 2</p>;
};

Test.propTypes = {
  /** Additional className for container */
  className: PropTypes.string
};

export default Test;

Expected behavior

Props table should render

Environment

  • OS: OSX 10.14.5
  • Node/npm version: v12.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions