I'm not sure how to properly configure "better-react-mathjax in this React App.
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
▶ 19 stack frames were collapsed.
CommonCartridge._callee8$
src/CommonCartridge.js:351
348 | ? this.state.showcaseResources[0]
349 | : null;
350 |
> 351 | this.setState({
| ^ 352 | ...result,
353 | externalViewers,
354 | isLoaded: true,
@@ -453,6 +454,8 @@ export default class CommonCartridge extends Component {
return (
<I18n>
{({ i18n }) => (
+ <MathJaxContext>
+ <MathJax>
<React.Fragment>
{this.props.compact !== true && (
<View
@@ -864,6 +867,8 @@ export default class CommonCartridge extends Component {
</div>
</div>
</React.Fragment>
+ </MathJax>
+ </MathJaxContext>
)}
</I18n>
);