Get React Version

Looking to get react version from one of your apps? You have a few different options!

Get React Version in code

If you’re already in the JavaScript, you can print the current React version by doing:

import React, { version } from 'react';


This also works with the require syntax:

const React = require('react');
const version = React.version;


You can also check your package-lock.json or yarn.lock file!

cat package-lock.json | grep \"react\" -A 1

Or, if you are using Yarn:

cat yarn.lock | grep \"react\" -A 1

Written by Jon Kuperman living in Florida working on Adobe's Creative Cloud. You should follow him on Twitter


    Loading Webmentions...

Related Posts

Check out the full archive →

Subscribe to my email list!

Let me be real with you. Sometimes when I'm bored I log in to Mailchimp and look at the audience number. If it's bigger than it was the week before, well that makes me feel really happy!

I promise I'll never spam you and I will, at most, send you a monthly update with what's happening on this site.

© 2021, Jon Kuperman