drcmda / drcmda/react-contextual
"Cannot call class as function" when extending @subscribe'd class?
- Dominant language
- JavaScript
- Stars
- 638
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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(
,
document.getElementById("root")
);
```
```
TypeError
Cannot call a class as a function
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.