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

前端 未结 12 1723
抹茶落季
抹茶落季 2020-12-12 23:07

Is there a way to know the runtime version of React in the browser?

12条回答
  •  囚心锁ツ
    2020-12-12 23:39

    In an existing project a simple way to see the React version is to go to a render method of any component and add:

    {React.version}

    This assumes you import React like this: import React from 'react'

提交回复
热议问题