Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[addon-info] No propTypes defined! on prop table in build mode #5251

Closed
feonit opened this issue Jan 15, 2019 · 17 comments
Closed

[addon-info] No propTypes defined! on prop table in build mode #5251

feonit opened this issue Jan 15, 2019 · 17 comments

Comments

@feonit
Copy link

feonit commented Jan 15, 2019

Maybe this refers to this issues:
#1141

I will duplicate my last comment here:

PropTypes still not worked for me in build mode. Here my component:

import React from "react";
import "./Background.css";
import PropTypes from "prop-types";

const Background = (props) => {
	const {children} = props;
	return (
		<div className={"Background"}>
			{children}
		</div>
	)
};

Background.displayName = "Background";

Background.propTypes = {
	/** My content */
	children: PropTypes.any.isRequired
};
export default Background;

For command NODE_ENV=production npm run storybook i have:
2019-01-15 18 33 02

And for npm run storybook:
2019-01-15 18 37 47

Same for the rest of the components too. But when i added:

Background.defaultProps = {
	children: 'my text'
};

the following happens:
2019-01-15 18 43 25

I use:

    "@storybook/addon-info": "4.1.2",
    "@storybook/addon-knobs": "4.1.2",
    "@storybook/addon-options": "4.1.2",
    "@storybook/cli": "4.1.2",
    "@storybook/react": "4.1.2",

is amazing

Am I doing something wrong?

@chulanovskyi
Copy link

chulanovskyi commented Jan 17, 2019

You know, we are using the Typescript and a plugin react-docgen-typescript-webpack-plugin to extract the interfaces into storybook/addon-info. The result prop table gets really into a mess if we describe children prop to be React.ReactChild.

component.tsx

storybook

Is it a real bug? Or we're doing it wrong too? :)

Also - if there are no doc comment line /** * */ then the property omits at all

@stale
Copy link

stale bot commented Feb 7, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Feb 7, 2019
@stale
Copy link

stale bot commented Mar 9, 2019

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale
Copy link

stale bot commented Mar 31, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Mar 31, 2019
@stale
Copy link

stale bot commented Apr 30, 2019

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Apr 30, 2019
@feonit
Copy link
Author

feonit commented May 28, 2019

and now, in version 5 it still not work!

@nelsieborja
Copy link

Any update on this issue?

@tuhinadasgupta
Copy link

would really appreciate an update on this issue!

@stale
Copy link

stale bot commented Jul 16, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jul 16, 2019
@feonit
Copy link
Author

feonit commented Jul 20, 2019

continue the discussion

@stale stale bot removed the inactive label Jul 20, 2019
@shilman
Copy link
Member

shilman commented Jul 20, 2019

FYI, addon-docs is the successor to addon-info and is currently in beta. We'll still take community contributions on addon-info, but most effort will be put into making docs better. To learn more about addon-docs: https://docs.google.com/document/d/1un6YX7xDKEKl5-MVb-egnOYN8dynb5Hf7mq0hipk8JE/edit?usp=sharing

@stale
Copy link

stale bot commented Aug 10, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Aug 10, 2019
@shilman
Copy link
Member

shilman commented Aug 26, 2019

FYI addon-info is being superceded by addon-docs, which fixes a bunch of bugs and is easier to maintain. It’s reached release candidate (RC) status and will be properly released soon. Please give it a try! https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

@stale stale bot removed the inactive label Aug 26, 2019
@Lory1990
Copy link

Lory1990 commented Sep 5, 2019

I have the same issue, do you have any news?

@stale
Copy link

stale bot commented Sep 26, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Sep 26, 2019
@stale
Copy link

stale bot commented Oct 26, 2019

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Oct 26, 2019
@nelsieborja
Copy link

Any update on this issue?

I have switched to addon-docs instead and I kind of actually prefer it. In case you're looking for a quick setup of it using TypeScript and CSF, this might probably help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants