Tutorial: How to use the new "using" keyword #55236
Unanswered
hazae41
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
You can find a full example here: https://codesandbox.io/p/sandbox/suspicious-worker-gmm84r
typescript,tslib,ts-loader, and@hazae41/symbol-dispose-polyfilltsconfig.json, settargetto before ESNext (e.g.ES2022), and setnoEmittofalse{ "compilerOptions": { "target": "ES2022", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": false, "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "plugins": [ { "name": "next" } ] }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] }next.config.js, addts-loaderto webpack_app.tsx/_app.jsx, add the following line at the top then two line breaksIf you use
appdirectory, you have to put it in a way it's included in both server and client pages:https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#using-context-providers
usingBeta Was this translation helpful? Give feedback.
All reactions