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

Bad things happen when there are multiple components with the same name #33

Closed
mik01aj opened this issue Nov 12, 2015 · 3 comments
Closed
Labels

Comments

@mik01aj
Copy link
Collaborator

mik01aj commented Nov 12, 2015

Basically, the page breaks because of keys here:

renderComponents() {
    let { highlightTheme, components } = this.props;

    return components.map((component) => {
        return (
            <ReactComponent highlightTheme={highlightTheme} component={component} key={component.name}/>
        );
    });
}

I think we could detect it in styleguide.loader.js and then either fix it (component #1, component #2, etc) or throw an error with some friendly message.

@sapegin
Copy link
Member

sapegin commented Nov 12, 2015

Or we can just append component path to key.

@sapegin sapegin added the bug label Nov 12, 2015
@mik01aj
Copy link
Collaborator Author

mik01aj commented Nov 16, 2015

And later, when we add ids like I did in lovelybooks@bb024de, shall we also use them for the navigation? (I mean relativePath)

@sapegin
Copy link
Member

sapegin commented Nov 16, 2015

Yeah, I think so.

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

No branches or pull requests

2 participants