Typescript is added to the version 16 react application created with create react app. I have installed the latest v.18 version of @types/react and @types/react-dom, but I would like to know if it is a problem that the version is different from react. Thank you.
npx typesync will resolve type syncing issues. The script checks your package.json and searches the web for the @types version of your package, if one is not already installed. This may also remove the @types packages should you no longer need it.
You can go a step further and add this in your package.json:
“postinstall”: “npx typesync”
Now every time you install or update your packages you’ll automatically run the postinstall script!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With