NervJS / nerv

A blazing fast React alternative, compatible with IE8 and React 16.
https://nerv.aotu.io
MIT License
5.42k stars 267 forks source link

MobX bindings? #8

Open benjamingr opened 6 years ago

benjamingr commented 6 years ago

Hey, do you have official MobX bindings?

yuche commented 6 years ago

Nope.

I notice that mobx-react using a rarely seen API which we don't have called unstable_batchedUpdates.

We are going to implementing this API. Hopefully by the time aliasing mobx-react will work. (If don't we have to write our own MobX bindings, after all MobX is a very popular library)

yuche commented 6 years ago

You can use mobx-react with Nerv by alias react-dom and react from now.

But mobx-react-devtools is not support yet because React's empty children is null, and Nerv is a empty array which might cause problem on this situation:

render () {
  if (this.props.children) return null
  return <App />
}

In this case Nerv always return null.

I guess we should change Nerv empty children to null as well.