Skip to content

Is missing in props validation #3031

@ruddi10

Description

@ruddi10

I have defined the interface of props of a functional component in a separate file and was trying to use it, but the "Is missing in props validation" error was thrown.

const RouteList: React.FC<routeListProps> = ({
  routes,
  error,
}: routeListProps) => {
  const styles = useStyleConfig("ReactWindow", {});
  const {
    globalState: { selectedRoutePath },
    changeRoute,
  } = GlobalStore.useContainer();
  const Row = ({ index, style }: rowParameters) => {
    if (routes.length == 0) return null;
    const { entity_name, chain_name, status } = routes[index];
    const rowStyles = useStyleConfig("Row", {
      variant: selectedRoutePath == chain_name ? "active" : "",
    });
    );
  
  );
};
export default RouteList;

export interface routeResponse {
  chain_name: string;
  entity_name: string;
  status: string;
}
export interface routeListProps {
  routes: routeResponse[];
  error: string | undefined;
}

Error -
Screenshot from 2021-08-05 01-24-48

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