reactjsreactfire

How to use a mixin in React v16 ES6/ES7


Based on the documentation for ReactFire, the way to use it is by adding a mixin to the component.

Mixins are not the way to go, HoC or Decorators should be used instead

So I wanted to create a Decorators, although the only way I found to use mixins is through React.creatClass(), which is deprecated and not even available in the latest React version.

How can I use a mixin with the latest version (v16.0)?

Or is there another way to use the library?


Solution

  • There's a long discussion on this here: https://github.com/firebase/reactfire/issues/38

    You may also want to check out some alternative to ReactFire, like re-base