I'm getting an unexpected error when inheriting from a @subscribe'd class, can anyone tell me if I'm doing this right?
https://codesandbox.io/s/9ynn07091o
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { Provider, subscribe } from "react-contextual";
const props = {
test: "hello"
};
@subscribe()
class A extends Component {
render() {
const { test } = this.props;
return test;
}
}
class B extends A {}
ReactDOM.render(
<Provider {...props}>
<B />
</Provider>,
document.getElementById("root")
);
TypeError
Cannot call a class as a function