Issue 1:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.11.0-39713716aa

Call stack: at store_Store.getElementAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22171:35)

at store_Store.getElementIDAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22187:26)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29770:63

at List.render (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23893:18)

at Ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14002:76)

at Hi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13993:10)

at uk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16728:86)

at tk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16245:11)

at qk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16237:23)

at jk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16221:5)

Component stack: at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)

at div

at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)

at div

at div

at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)

at div

at div

at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)

at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)

at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)

Issue 2:
NOT A DUPLICATE

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

package.json dependencies:

"dependencies": {
"@material-ui/core": "^4.0.0-alpha.8",
"@material-ui/icons": "^4.0.0-alpha.8",
"@material-ui/styles": "^4.0.0-alpha.8",
"@zeit/next-typescript": "^1.1.1",
"next": "^8.1.0",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"@types/next": "^8.0.3",
"@types/react": "^16.8.13",
"@types/react-dom": "^16.8.4",
"@types/styled-jsx": "^2.2.8",
"typescript": "^3.4.3"
}

index.tsx:

import React, { useContext } from "react";
import { Store } from "../state/store";
import { initialState } from "../state/reducers";
import { toggleDrawer } from "../state/actions";

export default function Index() {
// Get state contexts
const { state, dispatch } = useContext(Store);
const onClick = () => {
const drawerState: boolean = state.drawers.navmenu;
dispatch(toggleDrawer("navmenu", !drawerState));
};
const navmenu: string = initialState.drawers.navmenu.toString();
return (
<div>
<p>Value: {navmenu}</p>
<button onClick={onClick}>Change</button>
</div>
);
}

Error output:

[ error ] { Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component.

What is the expected behavior?

useContext is being called within the body of a function component. There should be no error. This is literally the only component in the entire app. I am not breaking any of:

You might have mismatching versions of React and the renderer (such as React DOM)

You might be breaking the Rules of Hooks

You might have more than one copy of React in the same app