How to usethe package.json file in ReactJS
The package.json contains metadata about our project. It is created by default when we create our React project. We can create a react app using the command mentioned below.
npx create-react-app name_of_the_app
The package.json file contains a lot of information in the name/value pairs in JSON format. We can easily check our React version under the list of dependencies as shown in the image given below.
How to check the version of ReactJS ?
React is a Javascript front-end library that is used to build single-page applications (SPA). Knowing the version can help you understand the available features, check for updates, and ensure compatibility with other dependencies. In this article, we will explore different methods to check the version of ReactJS.
To check the version of React we can use these 3 approaches:
Table of Content
- Using package.json file
- Using the command line
- Using the version property of default import from React
Contact Us