meteor / react-packages

Meteor packages for a great React developer experience
http://guide.meteor.com/react.html
Other
573 stars 158 forks source link

[react-meteor-data@0.2.6-beta.16] Errors when trying to use createContainer #179

Closed vadimmelnicuk closed 3 years ago

vadimmelnicuk commented 8 years ago

I am trying to use createContainer approach for explained in http://guide.meteor.com/v1.3/react.html#data I have setup a simple app like so:

meteor 1.3-rc.5 react-meter-data 0.2.6-beta.16

home.jsx

import React from 'react';

export default class HomeComponent extends React.Component {
    render() {
        return (
            <div className="grid">
                <h1>Hello World</h1>
            </div>
        );
    }
};

home.js

import { createContainer } from 'meteor/react-meteor-data';
import HomeComponent from '/imports/components/home.jsx';

export default createContainer((params) => {
    return true;
}, HomeComponent);

I get this error on server side:

Error: Can't find npm module 'react-addons-pure-render-mixin'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?

After adding react-addons-pure-render-mixin manually npm install --save react-addons-pure-render-mixin I get following errors on client side:

modules.js?hash=a656bf0…:19577 Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).

modules.js?hash=a656bf0…:19307 Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

shenrenguo commented 8 years ago

+1 meteor 1.3-rc.12

jedwards1211 commented 8 years ago

still exists in react-meteor-data@0.2.9

Streemo commented 8 years ago

+1, using meteor 1.3.2.4

Is there a recommended way to pass the props down to children of the container ? I am trying to use my container as a wrapper component to establish clear reactive dependency for the children.

@vadimmelnicuk did you ever find a fix for this?

filipenevola commented 3 years ago

I'm closing this just because it's too old. We can open new issues for items that are still valid.