ManuelDeLeon / viewmodel-react

Create your React components with view models.
MIT License
24 stars 3 forks source link

v0.7.0 - Uncaught Invariant Violation #8

Closed fvpDev closed 8 years ago

fvpDev commented 8 years ago

After updating I got the following error: invariant.js:38 Uncaught Invariant Violation: Element appears to be neither ReactComponent nor DOMNode Looks like it has to do with when I have (example):

render() {
  <div>{this.props.children}</div>
}
ManuelDeLeon commented 8 years ago

Make a repro. The following works fine:

App({
  render(){
    <div>
      <Sub>Hello World</Sub>
    </div>
  }
});
Sub({
  render(){
    <div>
      { this.props.children }
    </div>
  }
});
fvpDev commented 8 years ago

https://github.com/fvpDev/vm-meteor-react-repros/tree/issue_8 Sry that took so long

ManuelDeLeon commented 8 years ago

Extracting meteor-tool@1.4.0-1...

/sigh

ManuelDeLeon commented 8 years ago

Still going: Loading juliancwirko:postcss@1.1.1... (at least it's with a different package)

I'm really done with Meteor. The magic is completely gone. I can't remember the last time it just worked.

fvpDev commented 8 years ago

I know, but I'm sure they're aware of all the issues and complaints about how long it takes and they are improving on this. It still works for me and will work better in the future, don't lose faith in an idea just because there's a hiccup in this current, relatively small period of time. I'm sure they'll pull through and it's up to users like us to support them.

ManuelDeLeon commented 8 years ago

Pick up viewmodel-react@0.7.6

I remember how happy and enthusiastic I was when I talked to people about Meteor.

Sorry to be a downer but I don't have hope for Meteor anymore. The last bit of hope for the new Meteor stack (w Apollo) to be easy and simple was crushed this week with the announcement of Apollo subscriptions. After almost a year the Apollo stack is still hideously complex and there is zero sign that will change any time soon.

So the old Meteor is dead (hasn't received any work in over 2 years) and the new one is just as complex as anything else out there. Then there are the mountains of performance issues (startup, reload, updating, etc.)

I won't rewrite my current apps but the new ones definitely won't be with Meteor. I don't know where I'll go next but Horizon is on the top of my list.

But hey, if it's working for you and you're happy then by all means keep using it.

To leave you with a happy note, I'm working to bake Pub-Sub into ViewModel. It will work like this:

Button({
  pub: 'save',
  render() {
    <button b="click: save">Save</button>
  }
})

Form({
  sub: {
    save() {
      // Save form data
    }
  },
  render() {
    <form />
  }
})

If we add a grid that also needs to save, we just subscribe to save too:

Grid({
  sub: {
    save() {
      // Save form data
    }
  },
  render() {
    <div />
  }
})

Other components can publish the same event too:

AnotherButton({
  pub: 'save',
  render() {
    <button b="click: save">Save</button>
  }
})
fvpDev commented 8 years ago

Hmmm...I was thinking about Horizon too; maybe it won't crash and burn like a meteor lol Have you any experience with it yet/how do you like it?

ManuelDeLeon commented 8 years ago

I did a small prototype with Horizon and VM for React and the experience was very Meteor like. As far as I can tell the only things it's missing are accounts-password (it only has authentication with 3rd parties like Google and Facebook) and server methods (you have to roll your own).

On Sep 17, 2016 4:54 PM, "Fedor Parfenov" notifications@github.com wrote:

Hmmm...I was thinking about Horizon too; maybe it won't crash and burn like a meteor lol Have you any experience with it yet/how do you like it?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ManuelDeLeon/viewmodel-react/issues/8#issuecomment-247813044, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31mU4I9tQ1KXruZHWHTCTM9E5q2eiks5qrG-GgaJpZM4Jw9cX .

fvpDev commented 8 years ago

Yeah...That's why I haven't looked into them more. I'm too busy with production to not use packages that are already available via Meteor, otherwise I'd help with Horizon development if I could.