Currently, "@types/react-dom" is listed as a dependency in package.json. To align with good development practices, we should move "@types/react-dom" to devDependencies.
Steps:
- Open
package.json file.
- Locate the
"dependencies" section.
- Find the entry for
"@types/react-dom" and cut it.
- Scroll down to the
"devDependencies" section.
- Paste the
"@types/react-dom" entry under "devDependencies".
- Save the
package.json file.
Additional Steps:
- Run
npm install to update the package-lock.json file with the changes made to package.json.
Additional Note:
- Moving
"@types/react-dom" to devDependencies ensures that it is only installed in the development environment, reducing the package size in production builds.
- This should be easy for sure 😀 , feel free to ask question if you have any challenges following through the steps
Currently,
"@types/react-dom"is listed as a dependency inpackage.json. To align with good development practices, we should move"@types/react-dom"todevDependencies.Steps:
package.jsonfile."dependencies"section."@types/react-dom"and cut it."devDependencies"section."@types/react-dom"entry under"devDependencies".package.jsonfile.Additional Steps:
npm installto update thepackage-lock.jsonfile with the changes made topackage.json.Additional Note:
"@types/react-dom"todevDependenciesensures that it is only installed in the development environment, reducing the package size in production builds.