How to Check React App Version?

Check react app version; In this easy tutorial, i will show you simple ways to check the version of React App using using command line, package.json & app.js.

React. js is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. React allows developers to create large web applications that can change data, without reloading the page. The main purpose of React is to be fast, scalable, and simple.

How to Check React App Version

  • 1 – To Check React Version using directly visiting the package.json
  • 2 – To Check React Version by visiting the react.development.js
  • 3 – To Check React Version using App.js
  • 4 – To Check React Version using Command Line

1 – To Check React Version using directly visiting the package.json

The first method is very easy. For this, you just have to open the package.json file. And that you can see the version of your React app:

{
  ...
  ...
  ...
  "name": "react-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1"
  },
  ...
  ...
  ...
}

2 – To Check React Version by visiting the react.development.js

The second method is also similar to the first method is very easy. For this you just have to open react.development.js file. Which you will find inside node_modules/react/cjs/ directory. And you can check the version of your react app here:

/** @license React v16.13.1
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

3 – To Check React Version using App.js

The third method is a little different. In this you have to open app.jsfile. Which you will find inside the Src directory. And then you have to add the following code to your app.js file:

import React from 'react'
function App() {
  return (
    <div className="App">
        Here is the Latest React version: <strong>{React.version}</strong>
    </div>
  );
}
export default App;

After this, you have to go to the terminal and execute the command given below. Which will start your React JS app:

npm start

4 – To Check React Version using Command Line

The fourth way is very simple. Only you have to go to terminal and visit your react app by using cd /path/your_react_name command.

And when you will be in your react app directory on the terminal. So you execute the command given below. With this you can check the version of your React app:

npm view react version

Now you will see the version of React app installed on your terminal.

What is react version lists?

Checkout the react all versions list:

VersionRelease DateChanges
0.3.029 May 2013Initial Public Release
0.4.020 July 2013Support for comment nodes <div>{/* */}</div>, Improved server-side rendering APIs, Removed React.autoBind, Support for the key prop, Improvements to forms, Fixed bugs.
0.5.020 October 2013Improve Memory usage, Support for Selection and Composition events, Support for getInitialState and getDefaultProps in mixins, Added React.version and React.isValidClass, Improved compatibility for Windows.
0.8.020 December 2013Added support for rows & cols, defer & async, loop for <audio> & <video>, autoCorrect attributes. Added onContextMenu events, Upgraded jstransform and esprima-fb tools, Upgraded browserify.
0.9.020 February 2014Added support for crossOrigin, download and hrefLang, mediaGroup and muted, sandbox, seamless, and srcDoc, scope attributes, Added any, arrayOf, component, oneOfType, renderable, shape to React.PropTypes, Added support for onMouseOver and onMouseOut event, Added support for onLoad and onError on <img> elements.
0.10.021 March 2014Added support for srcSet and textAnchor attributes, add update function for immutable data, Ensure all void elements don’t insert a closing tag.
0.11.017 July 2014Improved SVG support, Normalized e.view event, Update $apply command, Added support for namespaces, Added new transformWithDetails API, includes pre-built packages under dist/, MyComponent() now returns a descriptor, not an instance.
0.12.021 November 2014Added new features Spread operator ({…}) introduced to deprecate this.transferPropsTo, Added support for acceptCharset, classID, manifest HTML attributes, React.addons.batchedUpdates added to API, @jsx React.DOM no longer required, Fixed issues with CSS Transitions.
0.13.010 March 2015Deprecated patterns that warned in 0.12 no longer work, ref resolution order has changed, Removed properties this._pendingState and this._rootNodeID, Support ES6 classes, Added API React.findDOMNode(component), Support for iterators and immutable-js sequences, Added new features React.addons.createFragment, deprecated React.addons.classSet.
0.14.129 October 2015Added support for srcLang, default, kind attributes, and color attribute, Ensured legacy .props access on DOM nodes, Fixed scryRenderedDOMComponentsWithClass, Added react-dom.js.
15.0.07 April 2016Initial render now uses document.createElement instead of generating HTML, No more extra <span>s, Improved SVG support, ReactPerf.getLastMeasurements() is opaque, New deprecations introduced with a warning, Fixed multiple small memory leaks, React DOM now supports the cite and profile HTML attributes and cssFloat, gridRow and gridColumn CSS properties.
15.1.020 May 2016Fix a batching bug, Ensure use of the latest object-assign, Fix regression, Remove use of merge utility, Renamed some modules.
15.2.01 July 2016Include component stack information, Stop validating props at mount time, Add React.PropTypes.symbol, Add onLoad handling to <link> and onError handling to <source> element, Add isRunning() API, Fix performance regression.
15.3.030 July 2016Add React.PureComponent, Fix issue with nested server rendering, Add xmlns, xmlnsXlink to support SVG attributes and referrerPolicy to HTML attributes, updates React Perf Add-on, Fixed issue with ref.
15.3.119 August 2016Improve performance of development builds, Cleanup internal hooks, Upgrade fbjs, Improve startup time of React, Fix memory leak in server rendering, fix React Test Renderer, Change trackedTouchCount invariant into a console.error.
15.4.016 November 2016React package and browser build no longer includes React DOM, Improved development performance, Fixed occasional test failures, update batchedUpdates API, React Perf, and ReactTestRenderer.create().
15.4.123 November 2016Restructure variable assignment, Fixed event handling, Fixed compatibility of browser build with AMD environments.
15.4.26 January 2017Fixed build issues, Added missing package dependencies, Improved error messages.
15.5.07 April 2017Added react-dom/test-utils, Removed peerDependencies, Fixed issue with Closure Compiler, Added a deprecation warning for React.createClass and React.PropTypes, Fixed Chrome bug.
15.5.411 April 2017Fix compatibility with Enzyme by exposing batchedUpdates on shallow renderer, Update version of prop-types, Fix react-addons-create-fragment package to include loose-envify transform.
15.6.013 June 2017Add support for CSS variables in style attribute and Grid style properties, Fix AMD support for addons depending on react, Remove unnecessary dependency, Add a deprecation warning for React.createClass and React.DOM factory helpers.
16.0.026 September 2017Improved error handling with introduction of “error boundaries”, React DOM allows passing non-standard attributes, Minor changes to setState behavior, remove react-with-addons.js build, Add React.createClass as create-react-class, React.PropTypes as prop-types, React.DOM as react-dom-factories, changes to the behavior of scheduling and lifecycle methods.
16.1.09 November 2017Discontinuing Bower Releases, Fix an accidental extra global variable in the UMD builds, Fix onMouseEnter and onMouseLeave firing, Fix <textarea> placeholder, Remove unused code, Add a missing package.json dependency, Add support for React DevTools.
16.3.029 March 2018Add a new officially supported context API, Add new packagePrevent an infinite loop when attempting to render portals with SSR, Fix an issue with this.state, Fix an IE/Edge issue.
16.3.13 April 2018Prefix private API, Fix performance regression and error handling bugs in development mode, Add peer dependency, Fix a false positive warning in IE11 when using Fragment.
16.3.216 April 2018Fix an IE crash, Fix labels in User Timing measurements, Add a UMD build, Improve performance of unstable_observedBits API with nesting.
16.4.024 May 2018Add support for Pointer Events specification, Add the ability to specify propTypes, Fix reading context, Fix the getDerivedStateFromProps() support, Fix a testInstance.parent crash, Add React.unstable_Profiler component for measuring performance, Change internal event names.
16.5.05 September 2018Add support for React DevTools Profiler, Handle errors in more edge cases gracefully, Add react-dom/profiling, Add onAuxClick event for browsers, Add movementX and movementY fields to mouse events, Add tangentialPressure and twist fields to pointer event.
16.6.023 October 2018Add support for contextType, Support priority levels, continuations, and wrapped callbacks, Improve the fallback mechanism, Fix gray overlay on iOS Safari, Add React.lazy() for code splitting components.
16.7.020 December 2018Fix performance of React.lazy for lazily-loaded components, Clear fields on unmount to avoid memory leaks, Fix bug with SSR, Fix a performance regression.
16.8.06 February 2019Add Hooks, Add ReactTestRenderer.act() and ReactTestUtils.act() for batching updates, Support synchronous thenables passed to React.lazy(), Improve useReducer Hook lazy initialization API.
16.8.627 March 2019Fix an incorrect bailout in useReducer(), Fix iframe warnings in Safari DevTools, Warn if contextType is set to Context.Consumer instead of Context, Warn if contextType is set to invalid values.
16.9.09 August 2019Add <React.Profiler> API for gathering performance measurements programmatically. Remove unstable_ConcurrentMode in favor of unstable_createRoot
16.10.027 September 2019Fix edge case where a hook update wasn’t being memoized. Fix heuristic for determining when to hydrate, so we don’t incorrectly hydrate during an update. Clear additional fiber fields during unmount to save memory. Fix bug with required text fields in Firefox. Prefer Object.is instead of inline polyfill, when available. Fix bug when mixing Suspense and error handling.
16.10.128 September 2019Fix regression in Next.js apps by allowing Suspense mismatch during hydration to silently proceed
16.10.23 October 2019Fix regression in react-native-web by restoring order of arguments in event plugin extractors
16.11.022 October 2019Fix mouseenter handlers from firing twice inside nested React containers. Remove unstable_createRoot and unstable_createSyncRoot experimental APIs. (These are available in the Experimental channel as createRoot and createSyncRoot.)
16.12.014 November 2019React DOM – Fix passive effects (useEffect) not being fired in a multi-root app.React Is – Fix lazy and memo types considered elements instead of components
16.13.026 February 2020Features added in React Concurrent mode.Fix regressions in React core library and React Dom.
16.13.119 March 2020Fix bug in legacy mode Suspense.Revert warning for cross-component updates that happen inside class render lifecycles
16.14.014 October 2020Add support for the new JSX transform.
17.0.020 October 2020“No New Features” enables gradual React updates from older versions.Add new JSX Transform, Changes to Event Delegation
17.0.122 October 2020React DOM – Fixes a crash in IE11

Recommended React Posts

Leave a Comment