'React JSDoc functional component - I am getting the "inner" key when I document a component
When genereting the JSDoc of this component, I am getting the key "inner" next to my component definition. What does it mean? How can I remove it?
Methods
(inner) ActivityItemContainer() → {React.ReactElement}
This is my code:
/**
* Properties received by the ActivityItemContainer component
*
* @typedef {object} ActivityItemContainerProps
* @property {object} props - The ActivityItemContainer properties
* @property {React.ReactElement} [props.children] - The ActivityItemContainer's children
* @property {string} [props.icon] - The ActivityItemContainer's icon
* @property {string} props.date - The ActivityItemContainer's date
* @property {string} [props.backgroundColor] - The ActivityItemContainer's backgroundColor
*/
/**
* Component for containing the user activity
* with some design tweaks.
*
* @public
* @type {React.FC<ActivityItemContainerProps>}
* @returns {React.ReactElement} A fancy container
* @example
* const icon = {
* name: "ios-flash",
* type: "ionicon",
* size: 25,
* color: "#FF8100"
* };
*
* const date = "3 hours ago";
*
* return (
* <ActivityItemContainer icon={icon} date={date}>
* ...
* </ActivityItemContainer>
* );
* @version 1.0.0
* @since 1.0.0
*/
function ActivityItemContainer({
icon,
date,
backgroundColor,
children,
}) { ... }
Also, the following function is giving the same result to me:
/**
* @private
* @function areActivityItemContainerPropsEqual
* @param {object} prevProps Previous component's props
* @param {object} nextProps Next component's props
* @returns {boolean} Returns true if the component's date remains intact between renders. Otherwise, it returns false.
* @version 1.0.0
* @since 1.0.0
*/
function areActivityItemContainerPropsEqual(prevProps, nextProps) {
return prevProps.date === nextProps.date;
}
(private, inner) areActivityItemContainerPropsEqual(prevProps, nextProps) → {boolean}
Note: This is my file header:
/**
* @author ...
* @file Container for activity items.
* @copyright ...
* @license MIT
* @module components/Activity
* @exports {React.FC<ActivityItemContainerProps>} ActivityItemContainer
*/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
