Skip to content

node module react dependency? #8

@dpwrussell

Description

@dpwrussell

Hi,

I am not experience with node packaging, but I ran into an issue which I think must be to do with the React dependency of simple-react-modal. Initially I thought it was to do with dependencies vs dev/peer-dependencies, but I'm pretty sure it is a simple version mismatch problem. Potentially bump?

I tried this with a new React project. npm will install React 0.14.0 by default.

<Modal show={this.state.show} onClose={this.close}>
  <div>hey, click outside of me to close me!</div>
</Modal>

and in the browser, the response on loading the app:

Warning: Modal(...): React component classes must extend React.Component.

Then when trying to show the dialog:

Uncaught Error: Invariant Violation: Modal.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.

That all goes away if I nuke the React dependancy in simple-react-modal/node_modules

Cheers,

Douglas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions