You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using React hooks useState and useEffect in deno-react-minimal-frontend causes these errors when running the build script:
TS2339 [ERROR]: Property 'useState' does not exist on type '{}'.
const [errorMessage, setErrorMessage] = React.useState('')
~~~~~~~~
at file:///Users/craigdoremus/git/cdoremus/deno-react-minimal-frontend/src/components/App.tsx:18:49
TS2339 [ERROR]: Property 'useEffect' does not exist on type '{}'.
React.useEffect(() => {
~~~~~~~~~
at file:///Users/craigdoremus/git/cdoremus/deno-react-minimal-frontend/src/components/App.tsx:20:9
VSCode with the Deno extension installed displays no errors.
When npm start is run, the browser renders a blank page with the following errors in the JavaScript console:
client.bundle.js:18749 The above error occurred in the <App> component:
in App
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
logCapturedError @ client.bundle.js:18749
Uncaught TypeError: react_16_9_0_2.useState is not a function or its return value is not iterable
at App (client.bundle.js:23007)
at renderWithHooks (client.bundle.js:15070)
at mountIndeterminateComponent (client.bundle.js:16873)
at beginWork$1 (client.bundle.js:17694)
at HTMLUnknownElement.callCallback (client.bundle.js:4387)
at Object.invokeGuardedCallbackDev (client.bundle.js:4413)
at invokeGuardedCallback (client.bundle.js:4445)
at beginWork$$1 (client.bundle.js:21298)
at performUnitOfWork (client.bundle.js:20579)
at workLoopSync (client.bundle.js:20564)
The text was updated successfully, but these errors were encountered:
When modified tsconfig.json and bundle command to include: --config tsconfig.json:
Can bundle successfully, but running in browser yields error: Uncaught TypeError: Cannot read property 'default' of undefined at react_16_9_0_1_1["default"]
Using React hooks
useState
anduseEffect
in deno-react-minimal-frontend causes these errors when running the build script:VSCode with the Deno extension installed displays no errors.
When
npm start
is run, the browser renders a blank page with the following errors in the JavaScript console:The text was updated successfully, but these errors were encountered: