Categories
React Answers

How to tell the version of React running at runtime in the browser?

Spread the love

Sometimes, we want to tell the version of React running at runtime in the browser.

In this article, we’ll look at how to tell the version of React running at runtime in the browser.

How to tell the version of React running at runtime in the browser?

To tell the version of React running at runtime in the browser, we can use the React.version property.

For instance, we write

import React from "react";

console.log(React.version);

to log the React version by calling console.log with React.version.

Conclusion

To tell the version of React running at runtime in the browser, we can use the React.version property.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *