Reactime 4.0 State Debugging Time Travel Tool
Tags: react, redux, javascript, webdev
Published: 2020-07-16 17:36:52

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w0rgqas4p2jzinb8nmd0.png)

**<h3>What is Reactime</h3>**

If you're familiar with Redux DevTools, it is used as a tool for debugging applications that use and support Redux. It's most commonly known for its time-travel debugging tool. Reactime has the same concept, it is a tool used for time-travel debugging, but the main difference between the two is Reactime can be used to visually inspect state with React, React-Hooks, Context API, and Redux. 

**<h3>Reactime 3.0</h3>**

In the previous version of Reactime some of its latest features added more support for hooks (useState, useContext, useReducer, useEffect, etc). It also added support for React Router. Although these features were a great addition to Reactime, it lacks the support of applications that switch between using hooks, functional components, and class components all in one setting. Also, in order to use Reactime, it must be cloned and installed as a dependency. Once Reactime is installed onto your local machine, these are the necessary steps for your application to use Reactime.

Call the library method on your root container after rendering your App.

```
import reactime from 'reactime';

const rootContainer = document.getElementById('root');
ReactDOM.render(<App />, rootContainer);

reactime(rootContainer);
```
For experimental concurrent mode support.

```
import reactime from 'reactime';

const rootContainer = ReactDOM.createRoot(document.getElementById('root'));
rootContainer.render(<App />);
reactime(rootContainer);
```
For more information about the previous version of Reactime, [click here](https://blog.usejournal.com/time-traveling-state-debugger-reactime-now-supporting-concurrent-mode-routers-and-more-56f9ca6f7601) to learn more!

**<h3>Reactime 4.0</h3>**

I am proud to announce that Reactime 4.0 has new features that improve the overall user and developer experience. One of the biggest features of version 4.0 is removing the npm package altogether. That's right you heard that correctly! In previous versions of Reactime, users would have to follow the steps as previously mentioned above, but now it's as simple as downloading and installing Reactime from the Chrome Web Store. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wc53am2sudy0bjpnqdhz.gif)<center>*Reactime 4.0 Demo*</center>

Another newly added feature in Reactime includes a D3 visualization bubble chart that shows parent/child relationships between components, and displays render times for each of the components. This can be helpful for users to determine what areas of their application can be optimized. Components that are taking a long time to re-render unnecessarily can be potentially optimized by converting them to pure components or utilizing React.memo. 

Another notable feature added into this version is now there are keyboard shortcuts that make it more simple to use the application. Users can use up/down arrows to navigate to a state of their choosing. Pressing the Enter key command allows the user to time travel to its selected state. It triggers the same functionality as clicking the JUMP button.  

**<h3>Contribute to Reactime</h3>**

Reactime is an Open Source project that can always be more improved. We’d love for you to try Reactime out — download it form the Chrome Extension Store and try it out yourself! Please let us know what you think and if you would like to contribute to improving Reactime, submit a PR! If you’re interested, please visit our [GitHub](https://github.com/open-source-labs/reactime), [website](https://reactime.io/), and try out our [chrome extension](https://chrome.google.com/webstore/detail/reactime/cgibknllccemdnfhfpmjhffpjfeidjga).