Close Menu
Soshace Digital Blog

    Subscribe to Updates

    Get The Latest News, Updates, And Amazing Offers

    What's Hot
    Job

    3 Proven Strategies to Find Work-Life Balance for Remote Workers

    JavaScript

    React Lesson 2: Homework Assignment

    Funnel Strategy

    Lead Generation Funnels That Work: Real Examples from MSPs

    Important Pages:
    • Home
    • About
    • Services
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    Facebook X (Twitter) Instagram LinkedIn YouTube
    Today's Picks:
    • Scaling Success: Monitoring Indexation of Programmatic SEO Content
    • Leveraging Influencers: Key Drivers in New Product Launches
    • How Privacy-First Marketing Will Transform the Industry Landscape
    • The Impact of Social Proof on Thought Leadership Marketing
    • Balancing Value-Driven Content and Promotional Messaging Strategies
    • Top Influencer Marketing Platforms to Explore in 2025
    • Emerging Trends in Marketing Automation and AI Tools for 2023
    • Strategies to Mitigate Duplicate Content in Programmatic SEO
    Saturday, September 27
    Facebook X (Twitter) Instagram LinkedIn YouTube
    Soshace Digital Blog
    • Home
    • About
    • Services
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    Services
    • SaaS & Tech

      Maximizing Efficiency: How SaaS Lowers IT Infrastructure Costs

      August 27, 2025

      Navigating Tomorrow: Innovations Shaping the Future of SaaS

      August 27, 2025

      Maximizing Impact: Strategies for SaaS & Technology Marketing

      August 27, 2025
    • AI & Automation

      Enhancing Customer Feedback Analysis Through AI Innovations

      August 27, 2025

      Navigating the Impact of AI on SEO and Search Rankings

      August 27, 2025

      5 Automation Hacks Every Home Service Business Needs to Know

      May 3, 2025
    • Finance & Fintech

      Critical Missteps in Finance Marketing: What to Avoid

      August 27, 2025

      Analyzing Future Fintech Marketing Trends: Insights Ahead

      August 27, 2025

      Navigating the Complex Landscape of Finance and Fintech Marketing

      August 27, 2025
    • Legal & Compliance

      Exploring Thought Leadership’s Impact on Legal Marketing

      August 27, 2025

      Maximizing LinkedIn: Strategies for Legal and Compliance Marketing

      August 27, 2025

      Why Transparency Matters in Legal Advertising Practices

      August 27, 2025
    • Medical Marketing

      Enhancing Online Reputation Management in Hospitals: A Guide

      August 27, 2025

      Analyzing Emerging Trends in Health and Medical Marketing

      August 27, 2025

      Exploring Innovative Content Ideas for Wellness Blogs and Clinics

      August 27, 2025
    • E-commerce & Retail

      Strategic Seasonal Campaign Concepts for Online and Retail Markets

      August 27, 2025

      Emerging Trends in E-commerce and Retail Marketing Strategies

      August 27, 2025

      Maximizing Revenue: The Advantages of Affiliate Marketing for E-Commerce

      August 27, 2025
    • Influencer & Community

      Leveraging Influencers: Key Drivers in New Product Launches

      August 27, 2025

      Top Influencer Marketing Platforms to Explore in 2025

      August 27, 2025

      Key Strategies for Successful Influencer Partnership Negotiations

      August 27, 2025
    • Content & Leadership

      The Impact of Social Proof on Thought Leadership Marketing

      August 27, 2025

      Balancing Value-Driven Content and Promotional Messaging Strategies

      August 27, 2025

      Analyzing Storytelling’s Impact on Content Marketing Effectiveness

      August 27, 2025
    • SEO & Analytics

      Scaling Success: Monitoring Indexation of Programmatic SEO Content

      August 27, 2025

      Strategies to Mitigate Duplicate Content in Programmatic SEO

      August 27, 2025

      Effective Data Visualization Techniques for SEO Reporting

      August 27, 2025
    • Marketing Trends

      How Privacy-First Marketing Will Transform the Industry Landscape

      August 27, 2025

      Emerging Trends in Marketing Automation and AI Tools for 2023

      August 27, 2025

      Maximizing ROI: Key Trends in Paid Social Advertising

      August 27, 2025
    Soshace Digital Blog
    Blog / JavaScript / React / How to use the redux dev tools to speed up development and debugging
    React

    How to use the redux dev tools to speed up development and debugging

    dillionmegidaBy dillionmegidaDecember 24, 2020Updated:December 25, 2020No Comments9 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr Email Reddit
    How to use the redux dev tools to speed up development and debugging
    How to use the redux dev tools to speed up development and debugging
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link
    How to use the redux dev tools to speed up development and debugging
    How to use the redux dev tools to speed up development and debugging

    Redux is a state management library popularly known for its usage with React applications. With Redux, you get to manage your state in our store which you connect with reducers and action creators to update the store accordingly as well as feeding components the new state. Redux can be an overload for small applications, that’s why it is commonly used in larger apps. Redux comes with some complexities during setting up and configuration, but when you understand how it works, it becomes a seamless process. Then Redux DevTools!!!

    As the name implies, Redux dev tools are development tools used for Redux-based applications. They can be used during the development and production state of any application. Just like you have the Chrome DevTools for directly manipulating the content of the document on a web page, the Redux dev tools allows you to directly manipulate redux operations right there on the web application. That is:

    • you can control state
    • rewind state
    • dispatch action
    • track state, actions, and their payloads
    • and many redux-related activities
    • and many other special features

    …right from the Dev Tools.

    Let’s see this in action.

    Redux Dev Tools Tutorial on a Todo App

    We’ll be using the Redux DevTools on this demo Todo App built with React and Redux.

    The todo application demo used for testing the Redux DevTools
    The todo application demo used for testing the Redux DevTools

    This article is more of step by step process to achieve things (with screenshots), so you can practice along to see the tool in use. Firstly, let’s install the Redux DevTools extension. I will be using a Chrome browser for this example. You can find the extension on the Chrome Web Store. Once this is installed, you’ll find the icon close to your other extensions in the extensions bar. If the redux tool is activated by the application, the dev tool would be active, else, inactive. To activate, you’ll do this when setting up Redux in your codebase:

    const store = createStore(
      reducer,
      compose(typeof window === "object" &&
        typeof window.devToolsExtension !== "undefined" ?
          window.devToolsExtension() :
          f => f
      )
    )

    This checks if the extension is available and executes it. For our demo app, you’ll find it enabled and shows the following when clicked:

     Screenshot of the Redux DevTools
    Screenshot of the Redux DevTools

    Let’s see the beautiful features of the dev tools.

    Tracking state

    The inspector view shows two sections. On the left, you’ll find all the action types that have been triggered since the beginning of your application. As seen in the screenshot, there is an @@INIT action type, which is the first state of your app. To see the state, click the state button on the right. You’ll get this:

    The state view of the redux store
    The state view of the redux store

    As seen in the screenshot, there’s only one list on the todo array – “Use Redux” – which is currently uncompleted. Now let’s add a new item, say “Use Redux Dev Tools” and then mark the first item as completed. When we head back to the dev tools, we get this:

    The difference in the state after the COMPLETE_TODO action is triggered
    The difference in the state after the COMPLETE_TODO action is triggered

    Two more actions have been triggered – ADD_TODO and COMPLETE_TODO. As you’d notice, the “Diff” tab shows the difference in the state between the two new action types. This shows that the completed property of the item in the todo array which is at index 1 was changed from false to true. When you click on ADD_TODO and you click the Action tab, you’ll get:

    Read More:  JAMstack Architecture with Next.js
    The action object of the ADD_TODO action
    The action object of the ADD_TODO action

    This shows that the action came with a type of ADD_TODO and a text of Use Redux Dev Tools. This, of course, depends on how your app is structured. If you defined your actions as type and payload, you’ll get the same in the Dev Tools. These few examples above already give you a glimpse of how awesome Redux Dev Tools are. They help you track the state of your application. So if your state update breaks, or is not updated as expected, the Dev Tools can help you identify the specific action and payload that caused it. But there’s more to Dev Tools. Read on.

    Jumping To or Skipping Actions

    The Dev Tools keeps track of every action and how it updates the state. It also allows you to directly skip actions. For our example above, let’s say we want to skip the ADD_TODO action. You’ll find the button when you hover on the action like so:

    The skip button on the ADD_TODO action
    The skip button on the ADD_TODO action

    On skipping the action, you would discover how the Dev Tools updates the state like that action never happened. Here’s the new result:

    The change in UI after skipping the ADD_TODO action
    The change in UI after skipping the ADD_TODO action

    It shows that only one action was triggered, which is COMPLETE_TODO. Also, you can jump to several actions. You’ll find the button close to the skip button. Say, you’ve triggered many actions and you want to confirm the state after a specific action, you can jump to that action. For example, we can jump to the ADD_TODO action like so:

    The change in the state after jumping to the ADD_TODO action
    The change in the state after jumping to the ADD_TODO action

    As seen in the state bar, a new item is added but none of them has a completed property with true. This is because the COMPLETE_TODO has not been executed yet. Jumping to actions is also referred to as traveling in time. And this is a very nice and compelling feature of the Redux Dev Tools.

    Dispatch actions directly

    The Dev Tools are so powerful that you can directly dispatch actions. This makes it easier to test things in real-time before adding them to the codebase. Here’s an example (on a full-screen view of the dev tools, click Dispatcher):

    Dispatching action directly in the DevTools
    Dispatching action directly in the DevTools

    On clicking “Dispatch”, you’ll get this:

    The result of dispatching ADD_TODO action
    The result of dispatching ADD_TODO action

    Persist State updates on refresh

    Say you needed to reload your page to fetch more products from an API, but you do not want to lose all changes you’ve made to the state during development, Redux Dev Tools offers you a feature to allow that. In the bottom bar, you’ll find the “Persist” button with a pin icon. When you click that, you can reload your page while persisting all actions that have been executed. Alternatively, you can add ?debug_session= to the URL and every subsequent reload will persist changes to state.

    Pin State content

    In the above examples, we’ve seen how several actions change the whole state in our store. Another feature that Redux Dev Tools offer is allowing you to pin specific state content so you can watch how these actions affect that specific content. For example, restart the application, and add a new Todo – “Do some debugging”. In the Dev Tools, you’ll have:

    The state view after dispatching an ADD_TODO action
    The state view after dispatching an ADD_TODO action

    You’ll see several pins attached to different properties. There’s one beside todos, 0, id and many more. What pin does is to, as the word implies, pin that property so that we can watch how the property changes over time. For instance, let’s pin the 0 indexed object which is the new item we just added. The new view looks like this:

    Read More:  Create a simple POS with React, Node and MongoDB #1: Register and Login with JWT
    The state view after pinning the first object in the todos state
    The state view after pinning the first object in the todos state

    Now, head back to the application and check the new item we just added. When you open the Dev Tools again, you’ll notice that the Diff view only shows what has happened to the pinned state. Here’s what it shows:

    The diff view of the pinned object
    The diff view of the pinned object

    This feature is especially useful for large applications where several sub-state changes occur and you are only concerned about one.

    Committing Actions

    Using DevTools for debugging large applications with numerous actions can be tiring as you would have to scroll down to find the action that you want to work on. Thankfully, there is a “Commit” feature. It works similarly to how git commits changes. After running some actions in the Dev Tools, you can commit them using the “Commit” button above the action types. Committing changes is like restarting your application with the current state as the initial state. Hence, previous changes are cleared (just as git shows no changes after committing) and subsequent actions are treated as new changes. The following screenshot explains what I mean:

     The DevTools after committing previous actions
    The DevTools after committing previous actions

    As seen now, we have @@INIT action type but the todos array is populated from the committed actions. The DevTools also offers a revert feature. This feature clears every change made after a commit. So let’s add a new item, say, “Add new item”.

    The result after dispatching a new ADD_TODO action
    The result after dispatching a new ADD_TODO action

    This shows a new action. Now we can revert to the previous commit. You can find this button on the “Log monitor” (when you click on Inspector) view. On clicking revert, you’ll see that every other action is cleared.

    The result of the state after clicking revert
    The result of the state after clicking revert

    Conclusion

    For our example above, we’ve seen the Redux Dev Tools used in production. This is similar to how it would be used in the development, just that in development, you can configure the dev tools to do more. For example, you can add more options that control the dev tools. You can find more arguments to pass to the tool in the repository.

    Since the Dev Tools can be used in production, when bugs are discovered by users regarding state changes, you can easily replicate what the user did and monitor the change to see where the bugs came from. As seen in the Dev Tools, there are still numerous buttons like “Lock”, “Pause”, “Trace” and many more. The features explained in this article will aid your development and debugging process as you do not have to severally jump to the codebase to make changes to the state. Also, this reduces restarting your application and following state changes step by step as you can directly time travel to the point you’re concerned about.

    I believe this article has given you an insight into the awesome features that Dev Tools offers that make developing and debugging Redux-based applications faster. For further reading, you can check more on the repository which shows the configuration guides and more getting started tips.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    dillionmegida

      Related Posts

      JAMstack Architecture with Next.js

      March 15, 2024

      Rendering Patterns: Static and Dynamic Rendering in Nextjs

      March 7, 2024

      Handling Mutations and Data Fetching Using React Query

      September 12, 2023
      Leave A Reply Cancel Reply

      You must be logged in to post a comment.

      Stay In Touch
      • Facebook
      • Twitter
      • Pinterest
      • Instagram
      • YouTube
      • Vimeo
      Don't Miss
      JavaScript May 27, 2023

      How to Build Real-Time Applications Using Node.js and WebSockets

      Real-time chat applications are all the rage these days, and I can see why. They’ve transformed the way we communicate, collaborate, and socialize, making it easy to send and receive messages instantly. That’s why I’m excited to show you how to create your own real-time chat application using WebSockets and Node.js.

      Swarm Intelligence: Intensities

      April 23, 2023

      Follow These Guidelines to Write Testable Code That Can Scale | with Examples

      November 25, 2019

      Working with Jotai as your next state management in React

      May 26, 2023

      Categories

      • AI & Automation
      • Angular
      • ASP.NET
      • AWS
      • B2B Leads
      • Beginners
      • Blogs
      • Business Growth
      • Case Studies
      • Comics
      • Consultation
      • Content & Leadership
      • CSS
      • Development
      • Django
      • E-commerce & Retail
      • Entrepreneurs
      • Entrepreneurship
      • Events
      • Express.js
      • Facebook Ads
      • Finance & Fintech
      • Flask
      • Flutter
      • Franchising
      • Funnel Strategy
      • Git
      • GraphQL
      • Home Services Marketing
      • Influencer & Community
      • Interview
      • Java
      • Java Spring
      • JavaScript
      • Job
      • Laravel
      • Lead Generation
      • Legal & Compliance
      • LinkedIn
      • Machine Learning
      • Marketing Trends
      • Medical Marketing
      • MSP Lead Generation
      • MSP Marketing
      • NestJS
      • Next.js
      • Node.js
      • Node.js Lessons
      • Paid Advertising
      • PHP
      • Podcasts
      • POS Tutorial
      • Programming
      • Programming
      • Python
      • React
      • React Lessons
      • React Native
      • React Native Lessons
      • Recruitment
      • Remote Job
      • SaaS & Tech
      • SEO & Analytics
      • Soshace
      • Startups
      • Swarm Intelligence
      • Tips
      • Trends
      • Vue
      • Wiki
      • WordPress
      Top Posts

      Freelance Programming Is Great — but Is It for You?

      Remote Job September 27, 2019

      NLP Preprocessing using Spacy

      Machine Learning April 5, 2023

      Handling GraphQL API Authentication using Auth0 with Hasura Actions

      GraphQL March 4, 2021

      Уроки React. Урок 4. Домашнее Задание.

      Programming September 14, 2016

      Subscribe to Updates

      Get The Latest News, Updates, And Amazing Offers

      About Us
      About Us

      Soshace Digital delivers comprehensive web design and development solutions tailored to your business objectives. Your website will be meticulously designed and developed by our team of seasoned professionals, who combine creative expertise with technical excellence to transform your vision into a high-impact, user-centric digital experience that elevates your brand and drives measurable results.

      7901 4th St N, Suite 28690
      Saint Petersburg, FL 33702-4305
      Phone: 1(877)SOSHACE

      Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
      Our Picks
      Podcasts

      JavaScript and React Podcasts: The Ultimate Guide to Web Development Podcasts — Part 1

      Beginners

      TOP Most In-Demand IT Certifications 2020

      LinkedIn

      Strategic Messaging: Cultivating Relationships with LinkedIn Prospects

      Most Popular

      Effective Networking Strategies to Generate B2B Leads

      B2B Leads

      Partnerships with Conferences: Announcement for 2019-2020

      Events

      Unlock B2B Leads: Harnessing Strategic Partnerships Effectively

      B2B Leads
      © 2025 Soshace Digital.
      • Home
      • About
      • Services
      • Contact Us
      • Privacy Policy
      • Terms & Conditions

      Type above and press Enter to search. Press Esc to cancel.